Skip to content

Commit

Permalink
src: fix new V8 compiler warnings
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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>
  • Loading branch information
targos authored and MylesBorins committed Aug 1, 2017
1 parent 5c285c6 commit 7c84c79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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(
Expand Down
5 changes: 3 additions & 2 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1943,15 +1943,16 @@ 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);
argv[ERR_ARG_INPUT] =
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>());
}
}

Expand Down

0 comments on commit 7c84c79

Please sign in to comment.