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/node.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/node.cc')
-rw-r--r-- | src/node.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node.cc b/src/node.cc index 9e0e2464a02..649ac43fbe7 100644 --- a/src/node.cc +++ b/src/node.cc @@ -331,7 +331,7 @@ MaybeLocal<Value> Environment::BootstrapNode() { Local<String> env_string = FIXED_ONE_BYTE_STRING(isolate_, "env"); Local<Object> env_var_proxy; - if (!CreateEnvVarProxy(context(), isolate_, as_callback_data()) + if (!CreateEnvVarProxy(context(), isolate_, current_callback_data()) .ToLocal(&env_var_proxy) || process_object()->Set(context(), env_string, env_var_proxy).IsNothing()) { return MaybeLocal<Value>(); |