Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1035)

Unified Diff: extensions/renderer/event_bindings.cc

Issue 2931393003: [Content] Update V8ValueConverter::create to return a std::unique_ptr (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/event_bindings.cc
diff --git a/extensions/renderer/event_bindings.cc b/extensions/renderer/event_bindings.cc
index 03635433bed9af6f1ae7e5b0d69a5766d41149f5..30da489d3dd4ea8953cdc5ee0da3fa87527c0bd6 100644
--- a/extensions/renderer/event_bindings.cc
+++ b/extensions/renderer/event_bindings.cc
@@ -276,10 +276,9 @@ void EventBindings::AttachFilteredEvent(
std::unique_ptr<base::DictionaryValue> filter;
{
- std::unique_ptr<content::V8ValueConverter> converter(
- content::V8ValueConverter::create());
- std::unique_ptr<base::Value> filter_value(converter->FromV8Value(
- v8::Local<v8::Object>::Cast(args[1]), context()->v8_context()));
+ std::unique_ptr<base::Value> filter_value =
+ content::V8ValueConverter::Create()->FromV8Value(
+ v8::Local<v8::Object>::Cast(args[1]), context()->v8_context());
if (!filter_value || !filter_value->IsType(base::Value::Type::DICTIONARY)) {
args.GetReturnValue().Set(static_cast<int32_t>(-1));
return;

Powered by Google App Engine
This is Rietveld 408576698