Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a1b0e64

Browse filesBrowse files
joyeecheungdanielleadams
authored andcommitted
src: support fs_event_wrap binding in the snapshot
PR-URL: #38737 Refs: #35711 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 21ce3af commit a1b0e64
Copy full SHA for a1b0e64

File tree

Expand file treeCollapse file tree

2 files changed

+12
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-2
lines changed
Open diff view settings
Collapse file

‎src/fs_event_wrap.cc‎

Copy file name to clipboardExpand all lines: src/fs_event_wrap.cc
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
#include "async_wrap-inl.h"
2323
#include "env-inl.h"
24-
#include "node.h"
2524
#include "handle_wrap.h"
25+
#include "node.h"
26+
#include "node_external_reference.h"
2627
#include "string_bytes.h"
2728

28-
2929
namespace node {
3030

3131
using v8::Context;
@@ -52,6 +52,7 @@ class FSEventWrap: public HandleWrap {
5252
Local<Value> unused,
5353
Local<Context> context,
5454
void* priv);
55+
static void RegisterExternalReferences(ExternalReferenceRegistry* registry);
5556
static void New(const FunctionCallbackInfo<Value>& args);
5657
static void Start(const FunctionCallbackInfo<Value>& args);
5758
static void GetInitialized(const FunctionCallbackInfo<Value>& args);
@@ -117,6 +118,12 @@ void FSEventWrap::Initialize(Local<Object> target,
117118
env->SetConstructorFunction(target, "FSEvent", t);
118119
}
119120

121+
void FSEventWrap::RegisterExternalReferences(
122+
ExternalReferenceRegistry* registry) {
123+
registry->Register(New);
124+
registry->Register(Start);
125+
registry->Register(GetInitialized);
126+
}
120127

121128
void FSEventWrap::New(const FunctionCallbackInfo<Value>& args) {
122129
CHECK(args.IsConstructCall());
@@ -229,3 +236,5 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
229236
} // namespace node
230237

231238
NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs_event_wrap, node::FSEventWrap::Initialize)
239+
NODE_MODULE_EXTERNAL_REFERENCE(fs_event_wrap,
240+
node::FSEventWrap::RegisterExternalReferences)
Collapse file

‎src/node_external_reference.h‎

Copy file name to clipboardExpand all lines: src/node_external_reference.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class ExternalReferenceRegistry {
5656
V(errors) \
5757
V(fs) \
5858
V(fs_dir) \
59+
V(fs_event_wrap) \
5960
V(handle_wrap) \
6061
V(heap_utils) \
6162
V(messaging) \

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.