aboutsummaryrefslogtreecommitdiff
path: root/src/node_process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_process.cc')
-rw-r--r--src/node_process.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/node_process.cc b/src/node_process.cc
index 087a7a773e..ba774fd8fa 100644
--- a/src/node_process.cc
+++ b/src/node_process.cc
@@ -165,12 +165,15 @@ void HrtimeBigInt(const FunctionCallbackInfo<Value>& args) {
void Kill(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
+ Local<Context> context = env->context();
if (args.Length() != 2)
return env->ThrowError("Bad argument.");
- int pid = args[0]->Int32Value();
- int sig = args[1]->Int32Value();
+ int pid;
+ if (!args[0]->Int32Value(context).To(&pid)) return;
+ int sig;
+ if (!args[1]->Int32Value(context).To(&sig)) return;
int err = uv_kill(pid, sig);
args.GetReturnValue().Set(err);
}