Browse Source

src: replace usage of deprecated CompileUnbound

PR-URL: https://github.com/nodejs/node/pull/5159
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
process-exit-stdio-flushing
Michaël Zasso 9 years ago
committed by Ali Sheikh
parent
commit
16b0a8c1ac
  1. 5
      src/node_contextify.cc

5
src/node_contextify.cc

@ -524,7 +524,7 @@ class ContextifyScript : public BaseObject {
else if (produce_cached_data) else if (produce_cached_data)
compile_options = ScriptCompiler::kProduceCodeCache; compile_options = ScriptCompiler::kProduceCodeCache;
Local<UnboundScript> v8_script = ScriptCompiler::CompileUnbound( MaybeLocal<UnboundScript> v8_script = ScriptCompiler::CompileUnboundScript(
env->isolate(), env->isolate(),
&source, &source,
compile_options); compile_options);
@ -536,7 +536,8 @@ class ContextifyScript : public BaseObject {
try_catch.ReThrow(); try_catch.ReThrow();
return; return;
} }
contextify_script->script_.Reset(env->isolate(), v8_script); contextify_script->script_.Reset(env->isolate(),
v8_script.ToLocalChecked());
if (compile_options == ScriptCompiler::kConsumeCodeCache) { if (compile_options == ScriptCompiler::kConsumeCodeCache) {
args.This()->Set( args.This()->Set(

Loading…
Cancel
Save