summaryrefslogtreecommitdiff
path: root/src/node_contextify.cc
diff options
context:
space:
mode:
authorSarat Addepalli <sarat.addepalli@paytm.com>2018-03-20 23:29:17 +0530
committerMichaël Zasso <targos@protonmail.com>2018-03-23 08:50:03 +0100
commitc6c957d3cc3de335a0ccc25506d570b0a237a0ce (patch)
tree011861e35c1204d1a2f7c4f5eb76db4bea1644ee /src/node_contextify.cc
parent43506f1013c5568243dc800c42536d5aa72a3589 (diff)
downloadnode-new-c6c957d3cc3de335a0ccc25506d570b0a237a0ce.tar.gz
src: fix upcoming V8 deprecation warnings
PR-URL: https://github.com/nodejs/node/pull/19490 Fixes: https://github.com/nodejs/node/issues/18909 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r--src/node_contextify.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index 91df37b37d..07aa656b2c 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -1086,21 +1086,21 @@ class ContextifyScript : public BaseObject {
PersistentToLocal(env->isolate(), wrapped_script->script_);
Local<Script> script = unbound_script->BindToCurrentContext();
- Local<Value> result;
+ MaybeLocal<Value> result;
bool timed_out = false;
bool received_signal = false;
if (break_on_sigint && timeout != -1) {
Watchdog wd(env->isolate(), timeout, &timed_out);
SigintWatchdog swd(env->isolate(), &received_signal);
- result = script->Run();
+ result = script->Run(env->context());
} else if (break_on_sigint) {
SigintWatchdog swd(env->isolate(), &received_signal);
- result = script->Run();
+ result = script->Run(env->context());
} else if (timeout != -1) {
Watchdog wd(env->isolate(), timeout, &timed_out);
- result = script->Run();
+ result = script->Run(env->context());
} else {
- result = script->Run();
+ result = script->Run(env->context());
}
if (timed_out || received_signal) {
@@ -1131,7 +1131,7 @@ class ContextifyScript : public BaseObject {
return false;
}
- args.GetReturnValue().Set(result);
+ args.GetReturnValue().Set(result.ToLocalChecked());
return true;
}