refactor: use base::Value::Take*() (#41169)
* perf: avoid temporary strings in Converter<net::HttpRequestHeaders>::FromV8() * perf: take strings instead of copying them in ToResponseHead() * refactor: prefer base::Value::Take*() where appropriate As per the base::Value docs: "prefer over `std::move(value.Get...())` so clang-tidy can warn about potential use-after-move mistakes."
This commit is contained in:
parent
88f28a302f
commit
10fd0ba655
4 changed files with 6 additions and 8 deletions
|
@ -103,7 +103,7 @@ std::unique_ptr<base::Value::Dict> ParseManifest(
|
|||
LOG(ERROR) << "Failed to parse extension manifest.";
|
||||
return std::unique_ptr<base::Value::Dict>();
|
||||
}
|
||||
return std::make_unique<base::Value::Dict>(std::move(manifest->GetDict()));
|
||||
return std::make_unique<base::Value::Dict>(std::move(*manifest).TakeDict());
|
||||
}
|
||||
|
||||
void ElectronExtensionSystem::LoadComponentExtensions() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue