src: remove unnecessary ToLocalChecked call

PR-URL: https://github.com/nodejs/node/pull/33902
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Daniel Bevenius authored and Shelley Vohr committed 2020-06-30 09:34:21 -07:00
1 parent 660b130202
commit 2e36b192a6
1 file changed
+2 -2
+2 -2
View File
@@ -1122,14 +1122,14 @@ void ContextifyContext::CompileFunction(
context_extensions.size(), context_extensions.data(), options,
v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason, &script);
if (maybe_fn.IsEmpty()) {
Local<Function> fn;
if (!maybe_fn.ToLocal(&fn)) {
if (try_catch.HasCaught() && !try_catch.HasTerminated()) {
errors::DecorateErrorStack(env, try_catch);
try_catch.ReThrow();
}
return;
}
Local<Function> fn = maybe_fn.ToLocalChecked();
Local<Object> cache_key;
if (!env->compiled_fn_entry_template()->NewInstance(