From 0896fbedf8e6e008ecd8671c06a0a7761139e1d0 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 14 Feb 2019 23:40:41 +0100 Subject: 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 Reviewed-By: Gus Caplan Reviewed-By: James M Snell --- src/node_contextify.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'src/node_contextify.cc') 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 ContextifyContext::CreateV8Context( Local ctx = NewContext(env->isolate(), object_template); if (ctx.IsEmpty()) { - env->ThrowError("Could not instantiate context"); return MaybeLocal(); } -- cgit v1.2.3