diff options
author | James M Snell <jasnell@gmail.com> | 2017-10-26 22:04:07 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-11-01 21:42:15 -0700 |
commit | 67c8511ea13b6def8c39042b10749a9b182feeac (patch) | |
tree | 48f7f844ca12764d55c1297ff9762f18b704bc5a /src/node_util.cc | |
parent | 94b2be7a96a5b50022ea523af069c96dfb559fe0 (diff) | |
download | android-node-v8-67c8511ea13b6def8c39042b10749a9b182feeac.tar.gz android-node-v8-67c8511ea13b6def8c39042b10749a9b182feeac.tar.bz2 android-node-v8-67c8511ea13b6def8c39042b10749a9b182feeac.zip |
src: use internal/errors for startSigintWatchdog
Move the throw out of c++ and into js using internal/errors
PR-URL: https://github.com/nodejs/node/pull/16546
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/node_util.cc')
-rw-r--r-- | src/node_util.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/node_util.cc b/src/node_util.cc index cf26eca692..fa30ae4472 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -135,10 +135,7 @@ static void SetHiddenValue(const FunctionCallbackInfo<Value>& args) { void StartSigintWatchdog(const FunctionCallbackInfo<Value>& args) { int ret = SigintWatchdogHelper::GetInstance()->Start(); - if (ret != 0) { - Environment* env = Environment::GetCurrent(args); - env->ThrowErrnoException(ret, "StartSigintWatchdog"); - } + args.GetReturnValue().Set(ret == 0); } |