Skip to content

Commit

Permalink
src: replace usage of deprecated CompileUnbound
Browse files Browse the repository at this point in the history
PR-URL: #5159
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
targos authored and Ali Sheikh committed Mar 4, 2016
1 parent 023c317 commit 16b0a8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ class ContextifyScript : public BaseObject {
else if (produce_cached_data)
compile_options = ScriptCompiler::kProduceCodeCache;

Local<UnboundScript> v8_script = ScriptCompiler::CompileUnbound(
MaybeLocal<UnboundScript> v8_script = ScriptCompiler::CompileUnboundScript(
env->isolate(),
&source,
compile_options);
Expand All @@ -536,7 +536,8 @@ class ContextifyScript : public BaseObject {
try_catch.ReThrow();
return;
}
contextify_script->script_.Reset(env->isolate(), v8_script);
contextify_script->script_.Reset(env->isolate(),
v8_script.ToLocalChecked());

if (compile_options == ScriptCompiler::kConsumeCodeCache) {
args.This()->Set(
Expand Down

0 comments on commit 16b0a8c

Please sign in to comment.