diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 6599e87043..4d51c3d140 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -219,7 +219,8 @@ class JsBindingsSessionDelegate : public InspectorSessionDelegate { Local argument = v8string.ToLocalChecked().As(); Local callback = callback_.Get(isolate); Local receiver = receiver_.Get(isolate); - static_cast(callback->Call(env_->context(), receiver, 1, &argument)); + callback->Call(env_->context(), receiver, 1, &argument) + .FromMaybe(Local()); } void Disconnect() { @@ -353,10 +354,10 @@ void InspectorConsoleCall(const v8::FunctionCallbackInfo& info) { Local node_method = info[1]; CHECK(node_method->IsFunction()); - static_cast(node_method.As()->Call(context, - info.Holder(), - call_args.size(), - call_args.data())); + node_method.As()->Call(context, + info.Holder(), + call_args.size(), + call_args.data()).FromMaybe(Local()); } void CallAndPauseOnStart( diff --git a/src/node_url.cc b/src/node_url.cc index c50700b294..54dbc3a053 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -1943,7 +1943,7 @@ static void Parse(Environment* env, null, // fragment defaults to null }; SetArgs(env, argv, &url); - (void)cb->Call(context, recv, arraysize(argv), argv); + cb->Call(context, recv, arraysize(argv), argv).FromMaybe(Local()); } else if (error_cb->IsFunction()) { Local argv[2] = { undef, undef }; argv[ERR_ARG_FLAGS] = Integer::NewFromUnsigned(isolate, url.flags); @@ -1951,7 +1951,8 @@ static void Parse(Environment* env, String::NewFromUtf8(env->isolate(), input, v8::NewStringType::kNormal).ToLocalChecked(); - (void)error_cb.As()->Call(context, recv, arraysize(argv), argv); + error_cb.As()->Call(context, recv, arraysize(argv), argv) + .FromMaybe(Local()); } }