Skip to content

Commit

Permalink
src: remove unnecessary ToLocalChecked call
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
danbev authored and codebytere committed Jun 27, 2020
1 parent ebb2fb8 commit 6014e4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6014e4e

Please sign in to comment.