chore: remove unnecessary casting to base::Value (#37591)

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-03-20 15:26:42 +01:00 committed by GitHub
parent 64b39dce14
commit 7ed3c7a359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8 deletions

View file

@ -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)));