Permalink
Browse files

fs: make fs_event_wrap binding internal

PR-URL: #22480
Refs: #22160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
cjihrig committed Aug 23, 2018
1 parent dca2f98 commit 6e942e73536232a71a47b81565ecf27be24958f4
@@ -348,6 +348,7 @@
// internalBinding.
const internalBindingWhitelist =
new SafeSet([
'fs_event_wrap',
'uv',
'http_parser',
'process_wrap',
@@ -1,11 +1,12 @@
'use strict';
const errors = require('internal/errors');
const { internalBinding } = require('internal/bootstrap/loaders');
const {
kFsStatsFieldsLength,
StatWatcher: _StatWatcher
} = process.binding('fs');
const { FSEvent } = process.binding('fs_event_wrap');
const { FSEvent } = internalBinding('fs_event_wrap');
const { EventEmitter } = require('events');
const {
getStatsFromBinding,
View
@@ -235,4 +235,4 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
} // anonymous namespace
} // namespace node
NODE_BUILTIN_MODULE_CONTEXT_AWARE(fs_event_wrap, node::FSEventWrap::Initialize)
NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs_event_wrap, node::FSEventWrap::Initialize)
@@ -88,7 +88,7 @@ function testInitialized(req, ctor_name) {
{
const FSEvent = process.binding('fs_event_wrap').FSEvent;
const FSEvent = internalBinding('fs_event_wrap').FSEvent;
testInitialized(new FSEvent(), 'FSEvent');
}

0 comments on commit 6e942e7

Please sign in to comment.