Skip to content

Commit 6014e4e

Browse files
danbevcodebytere
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 ebb2fb8 commit 6014e4e

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
@@ -1122,14 +1122,14 @@ void ContextifyContext::CompileFunction(
11221122
context_extensions.size(), context_extensions.data(), options,
11231123
v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason, &script);
11241124

1125-
if (maybe_fn.IsEmpty()) {
1125+
Local<Function> fn;
1126+
if (!maybe_fn.ToLocal(&fn)) {
11261127
if (try_catch.HasCaught() && !try_catch.HasTerminated()) {
11271128
errors::DecorateErrorStack(env, try_catch);
11281129
try_catch.ReThrow();
11291130
}
11301131
return;
11311132
}
1132-
Local<Function> fn = maybe_fn.ToLocalChecked();
11331133

11341134
Local<Object> cache_key;
11351135
if (!env->compiled_fn_entry_template()->NewInstance(

0 commit comments

Comments
 (0)