Skip to content

Commit

Permalink
Don't check for pending exception when returning from NAPI napi_throw…
Browse files Browse the repository at this point in the history
…* methods
  • Loading branch information
boingoing authored and jasongin committed Feb 1, 2017
1 parent c7cb65e commit bc36c37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_jsvmapi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ napi_status napi_throw(napi_env e, napi_value error) {
v8impl::V8LocalValueFromJsValue(error));
// any VM calls after this point and before returning
// to the javascript invoker will fail
return GET_RETURN_STATUS();
return napi_ok;
}

napi_status napi_throw_error(napi_env e, const char* msg) {
Expand All @@ -1303,7 +1303,7 @@ napi_status napi_throw_error(napi_env e, const char* msg) {
isolate->ThrowException(v8::Exception::Error(str));
// any VM calls after this point and before returning
// to the javascript invoker will fail
return GET_RETURN_STATUS();
return napi_ok;
}

napi_status napi_throw_type_error(napi_env e, const char* msg) {
Expand All @@ -1316,7 +1316,7 @@ napi_status napi_throw_type_error(napi_env e, const char* msg) {
isolate->ThrowException(v8::Exception::TypeError(str));
// any VM calls after this point and before returning
// to the javascript invoker will fail
return GET_RETURN_STATUS();
return napi_ok;
}

napi_status napi_get_number_from_value(napi_env e, napi_value v, double* result) {
Expand Down

0 comments on commit bc36c37

Please sign in to comment.