Skip to content

Commit 88d12c0

Browse files
danbevaddaleax
authored andcommitted
src: remove unnecessary ToLocalChecked call
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]>
1 parent ff7fbc3 commit 88d12c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_contextify.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1119,14 +1119,14 @@ void ContextifyContext::CompileFunction(
11191119
context_extensions.size(), context_extensions.data(), options,
11201120
v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason, &script);
11211121

1122-
if (maybe_fn.IsEmpty()) {
1122+
Local<Function> fn;
1123+
if (!maybe_fn.ToLocal(&fn)) {
11231124
if (try_catch.HasCaught() && !try_catch.HasTerminated()) {
11241125
errors::DecorateErrorStack(env, try_catch);
11251126
try_catch.ReThrow();
11261127
}
11271128
return;
11281129
}
1129-
Local<Function> fn = maybe_fn.ToLocalChecked();
11301130

11311131
Local<Object> cache_key;
11321132
if (!env->compiled_fn_entry_template()->NewInstance(

0 commit comments

Comments
 (0)