diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-03-05 03:28:45 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-04-06 03:06:35 +0300 |
commit | 6576b9b9d0f3de931e5e867a7b4b43319b187955 (patch) | |
tree | 11b377c01fb4c2910f66efd41847f3dfbc773eb2 /src/fs_event_wrap.cc | |
parent | c2aedd0310f2efdeb2ae69e14ae9950880bde24a (diff) |
src: make creating per-binding data structures easier
Enable the state associated with the individual bindings, e.g. fs or
http2, to be moved out of the Environment class, in order for these
to be more modular and for Environment to be come less of a collection
of random data fields.
Do this by using a BaseObject as the data for callbacks, which can hold
the per-binding state. By default, no per-binding state is available,
although that can be configured when setting up the binding.
PR-URL: https://github.com/nodejs/node/pull/32538
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/fs_event_wrap.cc')
-rw-r--r-- | src/fs_event_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 858455bff2d..b4b110cc2c8 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -108,7 +108,7 @@ void FSEventWrap::Initialize(Local<Object> target, Local<FunctionTemplate> get_initialized_templ = FunctionTemplate::New(env->isolate(), GetInitialized, - env->as_callback_data(), + env->current_callback_data(), Signature::New(env->isolate(), t)); t->PrototypeTemplate()->SetAccessorProperty( |