Browse Source

src: fix new V8 compiler warnings

PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v6
Michaël Zasso 8 years ago
committed by Myles Borins
parent
commit
a3c5ccd78c
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 11
      src/inspector_agent.cc
  2. 5
      src/node_url.cc

11
src/inspector_agent.cc

@ -219,7 +219,8 @@ class JsBindingsSessionDelegate : public InspectorSessionDelegate {
Local<Value> argument = v8string.ToLocalChecked().As<Value>();
Local<Function> callback = callback_.Get(isolate);
Local<Object> receiver = receiver_.Get(isolate);
static_cast<void>(callback->Call(env_->context(), receiver, 1, &argument));
callback->Call(env_->context(), receiver, 1, &argument)
.FromMaybe(Local<Value>());
}
void Disconnect() {
@ -353,10 +354,10 @@ void InspectorConsoleCall(const v8::FunctionCallbackInfo<Value>& info) {
Local<Value> node_method = info[1];
CHECK(node_method->IsFunction());
static_cast<void>(node_method.As<Function>()->Call(context,
info.Holder(),
call_args.size(),
call_args.data()));
node_method.As<Function>()->Call(context,
info.Holder(),
call_args.size(),
call_args.data()).FromMaybe(Local<Value>());
}
void CallAndPauseOnStart(

5
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<Value>());
} else if (error_cb->IsFunction()) {
Local<Value> 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<Function>()->Call(context, recv, arraysize(argv), argv);
error_cb.As<Function>()->Call(context, recv, arraysize(argv), argv)
.FromMaybe(Local<Value>());
}
}

Loading…
Cancel
Save