chore: remove unnecessary casting to base::Value (#37591)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
64b39dce14
commit
7ed3c7a359
5 changed files with 7 additions and 8 deletions
|
@ -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.
|
||||
|
|
|
@ -623,7 +623,7 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() {
|
|||
extension_info.Set("exposeExperimentalAPIs",
|
||||
extension->permissions_data()->HasAPIPermission(
|
||||
extensions::mojom::APIPermissionID::kExperimental));
|
||||
results.Append(base::Value(std::move(extension_info)));
|
||||
results.Append(std::move(extension_info));
|
||||
}
|
||||
|
||||
CallClientFunction("DevToolsAPI", "addExtensions",
|
||||
|
|
|
@ -282,7 +282,7 @@ void HandleAccessibilityRequestCallback(
|
|||
descriptor.Set(kNative, is_native_enabled);
|
||||
descriptor.Set(kWeb, is_web_enabled);
|
||||
descriptor.Set(kLabelImages, are_accessibility_image_labels_enabled);
|
||||
rvh_list.Append(base::Value(std::move(descriptor)));
|
||||
rvh_list.Append(std::move(descriptor));
|
||||
}
|
||||
|
||||
data.Set(kPagesField, std::move(rvh_list));
|
||||
|
@ -295,7 +295,7 @@ void HandleAccessibilityRequestCallback(
|
|||
data.Set(kBrowsersField, std::move(window_list));
|
||||
|
||||
std::string json_string;
|
||||
base::JSONWriter::Write(base::Value(std::move(data)), &json_string);
|
||||
base::JSONWriter::Write(data, &json_string);
|
||||
|
||||
std::move(callback).Run(
|
||||
base::MakeRefCounted<base::RefCountedString>(std::move(json_string)));
|
||||
|
|
|
@ -166,7 +166,7 @@ v8::Local<v8::Value> Converter<net::HttpResponseHeaders*>::ToV8(
|
|||
values->Append(value);
|
||||
}
|
||||
}
|
||||
return ConvertToV8(isolate, base::Value(std::move(response_headers)));
|
||||
return ConvertToV8(isolate, response_headers);
|
||||
}
|
||||
|
||||
bool Converter<net::HttpResponseHeaders*>::FromV8(
|
||||
|
|
Loading…
Reference in a new issue