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:
parent
dca2f9849c
commit
6e942e7353
@ -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,
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user