fs: make fs_event_wrap binding internal

PR-URL: https://github.com/nodejs/node/pull/22480
Refs: https://github.com/nodejs/node/issues/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>
This commit is contained in:
cjihrig 2018-08-23 11:18:08 -04:00
parent dca2f9849c
commit 6e942e7353
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
4 changed files with 5 additions and 3 deletions

View File

@ -348,6 +348,7 @@
// internalBinding.
const internalBindingWhitelist =
new SafeSet([
'fs_event_wrap',
'uv',
'http_parser',
'process_wrap',

View File

@ -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 File

@ -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)

View File

@ -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');
}