diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-02-14 23:40:41 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-02-17 17:47:16 +0100 |
commit | 0896fbedf8e6e008ecd8671c06a0a7761139e1d0 (patch) | |
tree | d56ce69fa27de45a93074a276ee283d48a340ffe /src/node_contextify.cc | |
parent | 7f0c515fed92ffd5fdfb003f99f808968101d7da (diff) | |
download | android-node-v8-0896fbedf8e6e008ecd8671c06a0a7761139e1d0.tar.gz android-node-v8-0896fbedf8e6e008ecd8671c06a0a7761139e1d0.tar.bz2 android-node-v8-0896fbedf8e6e008ecd8671c06a0a7761139e1d0.zip |
vm: do not overwrite error when creating context
An empty `Local<>` already indicates that an exception is pending,
so there is no need to throw an exception. In the case of Workers,
this could override a `.terminate()` call.
PR-URL: https://github.com/nodejs/node/pull/26112
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r-- | src/node_contextify.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 952acfe06f..343342408b 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -171,7 +171,6 @@ MaybeLocal<Context> ContextifyContext::CreateV8Context( Local<Context> ctx = NewContext(env->isolate(), object_template); if (ctx.IsEmpty()) { - env->ThrowError("Could not instantiate context"); return MaybeLocal<Context>(); } |