diff options
Diffstat (limited to 'deps/v8/src/d8/async-hooks-wrapper.cc')
-rw-r--r-- | deps/v8/src/d8/async-hooks-wrapper.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/deps/v8/src/d8/async-hooks-wrapper.cc b/deps/v8/src/d8/async-hooks-wrapper.cc index 2538e78acb..84191b9815 100644 --- a/deps/v8/src/d8/async-hooks-wrapper.cc +++ b/deps/v8/src/d8/async-hooks-wrapper.cc @@ -47,8 +47,7 @@ static AsyncHooksWrap* UnwrapHook( AsyncHooks* hooks = PerIsolateData::Get(isolate)->GetAsyncHooks(); if (!hooks->async_hook_ctor.Get(isolate)->HasInstance(hook)) { - isolate->ThrowException(String::NewFromUtf8Literal( - isolate, "Invalid 'this' passed instead of AsyncHooks instance")); + isolate->ThrowError("Invalid 'this' passed instead of AsyncHooks instance"); return nullptr; } @@ -87,8 +86,7 @@ Local<Object> AsyncHooks::CreateHook( Local<Context> currentContext = isolate->GetCurrentContext(); if (args.Length() != 1 || !args[0]->IsObject()) { - isolate->ThrowException(String::NewFromUtf8Literal( - isolate, "Invalid arguments passed to createHook")); + isolate->ThrowError("Invalid arguments passed to createHook"); return Local<Object>(); } |