diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-05-20 14:14:21 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-06-03 18:27:48 +0300 |
commit | a1a690e07c92d209cfecb2e7725ce649287edf26 (patch) | |
tree | 87dc42011acaab55a820ef378c0bd75cf1c20388 /src/node.cc | |
parent | bda7da34c6f8edabf45623acb21a410c76a33bff (diff) |
src: create Environment properties in Environment::CreateProperties()
Move creation of `env->as_callback_data()`, `env->primordials()`
and `env->process()` into `Environment::CreateProperties()` and
call it in the `Environment` constructor - this can be replaced with
deserialization when we snapshot the per-environment properties
after the instantiation of `Environment`.
PR-URL: https://github.com/nodejs/node/pull/27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/node.cc b/src/node.cc index 0edc6fd4ce0..d5c50bac88e 100644 --- a/src/node.cc +++ b/src/node.cc @@ -255,17 +255,6 @@ MaybeLocal<Value> RunBootstrapping(Environment* env) { global->Set(context, FIXED_ONE_BYTE_STRING(env->isolate(), "global"), global) .Check(); - // Store primordials setup by the per-context script in the environment. - Local<Object> per_context_bindings; - Local<Value> primordials; - if (!GetPerContextExports(context).ToLocal(&per_context_bindings) || - !per_context_bindings->Get(context, env->primordials_string()) - .ToLocal(&primordials) || - !primordials->IsObject()) { - return MaybeLocal<Value>(); - } - env->set_primordials(primordials.As<Object>()); - #if HAVE_INSPECTOR if (env->options()->debug_options().break_node_first_line) { env->inspector_agent()->PauseOnNextJavascriptStatement( |