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/udp_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/udp_wrap.cc')
-rw-r--r-- | src/udp_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 770782ee9cf..1c42481f178 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -145,7 +145,7 @@ void UDPWrap::Initialize(Local<Object> target, Local<FunctionTemplate> get_fd_templ = FunctionTemplate::New(env->isolate(), UDPWrap::GetFD, - env->as_callback_data(), + env->current_callback_data(), signature); t->PrototypeTemplate()->SetAccessorProperty(env->fd_string(), |