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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
danbev committed Jun 22, 2020
1 parent 122038c commit 54374d4
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 54374d4

Please sign in to comment.