Skip to content

Commit 16b0a8c

Browse files
targosAli Sheikh
authored and
Ali Sheikh
committed
src: replace usage of deprecated CompileUnbound
PR-URL: #5159 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 023c317 commit 16b0a8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/node_contextify.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ class ContextifyScript : public BaseObject {
524524
else if (produce_cached_data)
525525
compile_options = ScriptCompiler::kProduceCodeCache;
526526

527-
Local<UnboundScript> v8_script = ScriptCompiler::CompileUnbound(
527+
MaybeLocal<UnboundScript> v8_script = ScriptCompiler::CompileUnboundScript(
528528
env->isolate(),
529529
&source,
530530
compile_options);
@@ -536,7 +536,8 @@ class ContextifyScript : public BaseObject {
536536
try_catch.ReThrow();
537537
return;
538538
}
539-
contextify_script->script_.Reset(env->isolate(), v8_script);
539+
contextify_script->script_.Reset(env->isolate(),
540+
v8_script.ToLocalChecked());
540541

541542
if (compile_options == ScriptCompiler::kConsumeCodeCache) {
542543
args.This()->Set(

0 commit comments

Comments
 (0)