mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: remove unnecessary casting to base::Value (#37591)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
@@ -153,7 +153,7 @@ v8::Local<v8::Promise> Debugger::SendCommand(gin::Arguments* args) {
|
||||
request.Set("id", request_id);
|
||||
request.Set("method", method);
|
||||
if (!command_params.empty()) {
|
||||
request.Set("params", base::Value(std::move(command_params)));
|
||||
request.Set("params", std::move(command_params));
|
||||
}
|
||||
|
||||
if (!session_id.empty()) {
|
||||
@@ -161,7 +161,7 @@ v8::Local<v8::Promise> Debugger::SendCommand(gin::Arguments* args) {
|
||||
}
|
||||
|
||||
std::string json_args;
|
||||
base::JSONWriter::Write(base::Value(std::move(request)), &json_args);
|
||||
base::JSONWriter::Write(request, &json_args);
|
||||
agent_host_->DispatchProtocolMessage(
|
||||
this, base::as_bytes(base::make_span(json_args)));
|
||||
|
||||
|
||||
@@ -159,8 +159,7 @@ v8::Local<v8::Value> HttpResponseHeadersToV8(
|
||||
values->Append(base::Value(value));
|
||||
}
|
||||
}
|
||||
return gin::ConvertToV8(v8::Isolate::GetCurrent(),
|
||||
base::Value(std::move(response_headers)));
|
||||
return gin::ConvertToV8(v8::Isolate::GetCurrent(), response_headers);
|
||||
}
|
||||
|
||||
// Overloaded by multiple types to fill the |details| object.
|
||||
|
||||
Reference in New Issue
Block a user