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

Unified Diff: extensions/renderer/event_bindings.cc

Issue 744723002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « extensions/renderer/document_custom_bindings.cc ('k') | extensions/renderer/file_system_natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/event_bindings.cc
diff --git a/extensions/renderer/event_bindings.cc b/extensions/renderer/event_bindings.cc
index bf89669b452807604b56c66e760657af97039485..385906c33989dcbf508b716b1f9f707a5a81fe9a 100644
--- a/extensions/renderer/event_bindings.cc
+++ b/extensions/renderer/event_bindings.cc
@@ -142,7 +142,7 @@ void EventBindings::AttachEvent(
CHECK_EQ(1, args.Length());
CHECK(args[0]->IsString());
- std::string event_name = *v8::String::Utf8Value(args[0]->ToString());
+ std::string event_name = *v8::String::Utf8Value(args[0]);
if (!dispatcher_->CheckContextAccessToExtensionAPI(event_name, context()))
return;
@@ -216,8 +216,8 @@ void EventBindings::AttachFilteredEvent(
content::V8ValueConverter::create());
base::DictionaryValue* filter_dict = NULL;
- base::Value* filter_value =
- converter->FromV8Value(args[1]->ToObject(), context()->v8_context());
+ base::Value* filter_value = converter->FromV8Value(
+ v8::Local<v8::Object>::Cast(args[1]), context()->v8_context());
if (!filter_value) {
args.GetReturnValue().Set(static_cast<int32_t>(-1));
return;
@@ -276,8 +276,9 @@ void EventBindings::MatchAgainstEventFilter(
v8::Isolate* isolate = args.GetIsolate();
typedef std::set<EventFilter::MatcherID> MatcherIDs;
EventFilter& event_filter = g_event_filter.Get();
- std::string event_name = *v8::String::Utf8Value(args[0]->ToString());
- EventFilteringInfo info = ParseFromObject(args[1]->ToObject(), isolate);
+ std::string event_name = *v8::String::Utf8Value(args[0]);
+ EventFilteringInfo info =
+ ParseFromObject(args[1]->ToObject(isolate), isolate);
// Only match events routed to this context's RenderView or ones that don't
// have a routingId in their filter.
MatcherIDs matched_event_filters = event_filter.MatchEvent(
« no previous file with comments | « extensions/renderer/document_custom_bindings.cc ('k') | extensions/renderer/file_system_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698