From 16b0a8c1acb97a84e9a6e1868d600c525f27b0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 8 Feb 2016 22:36:40 +0100 Subject: [PATCH] src: replace usage of deprecated CompileUnbound PR-URL: https://github.com/nodejs/node/pull/5159 Reviewed-By: Ben Noordhuis --- src/node_contextify.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node_contextify.cc b/src/node_contextify.cc index f7ddf866b206f4..1819c5f21d7bc3 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -524,7 +524,7 @@ class ContextifyScript : public BaseObject { else if (produce_cached_data) compile_options = ScriptCompiler::kProduceCodeCache; - Local v8_script = ScriptCompiler::CompileUnbound( + MaybeLocal v8_script = ScriptCompiler::CompileUnboundScript( env->isolate(), &source, compile_options); @@ -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(