diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2020-04-20 01:16:58 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2020-07-18 06:02:56 +0300 |
commit | 404302fff5079b5d9faaecbb9a1b2de67f2d86cc (patch) | |
tree | 6508d3d4d3fa3081c7feb27d19ce0d4e4f60cd90 /src/api | |
parent | d379b00078bc4fb4d9f1e5e91b7ea08bcef59b63 (diff) |
src: split the main context initialization from Environemnt ctor
So that it's possible to create an Environment not yet attached
to any V8 context. We'll use this to deserialize the V8 context
before attaching an Environment to it.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/environment.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/api/environment.cc b/src/api/environment.cc index 997c9530fc2..1104d758f63 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -356,10 +356,7 @@ Environment* CreateEnvironment( exec_args, flags, thread_id); - if (flags & EnvironmentFlags::kOwnsProcessState) { - env->set_abort_on_uncaught_exception(false); - } - + env->InitializeMainContext(context); #if HAVE_INSPECTOR if (inspector_parent_handle) { env->InitializeInspector( |