Skip to content

Commit

Permalink
fs: make fs_event_wrap binding internal
Browse files Browse the repository at this point in the history
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 29, 2018
1 parent dca2f98 commit 6e942e7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
// internalBinding.
const internalBindingWhitelist =
new SafeSet([
'fs_event_wrap',
'uv',
'http_parser',
'process_wrap',
Expand Down
3 changes: 2 additions & 1 deletion lib/internal/fs/watchers.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/fs_event_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion test/sequential/test-async-wrap-getasyncid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 6e942e7

Please sign in to comment.