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

Unified Diff: chrome/renderer/extensions/event_bindings.cc

Issue 107083006: More v8-API-related cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « chrome/renderer/extensions/dispatcher.cc ('k') | chrome/renderer/extensions/i18n_custom_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/event_bindings.cc
diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc
index 1f06a1e59f7ad13cae723f402396305c7bbb16a3..130ffbd7ab015afe158b49275d97f4e55b69c895 100644
--- a/chrome/renderer/extensions/event_bindings.cc
+++ b/chrome/renderer/extensions/event_bindings.cc
@@ -265,21 +265,23 @@ class ExtensionImpl : public ChromeV8Extension {
void MatchAgainstEventFilter(
const v8::FunctionCallbackInfo<v8::Value>& args) {
+ 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(), args.GetIsolate());
+ ParseFromObject(args[1]->ToObject(), 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(
event_name, info, context()->GetRenderView()->GetRoutingID());
v8::Handle<v8::Array> array(
- v8::Array::New(args.GetIsolate(), matched_event_filters.size()));
+ v8::Array::New(isolate, matched_event_filters.size()));
int i = 0;
for (MatcherIDs::iterator it = matched_event_filters.begin();
it != matched_event_filters.end(); ++it) {
- array->Set(v8::Integer::New(i++), v8::Integer::New(*it));
+ array->Set(v8::Integer::New(isolate, i++),
+ v8::Integer::New(isolate, *it));
}
args.GetReturnValue().Set(array);
}
« no previous file with comments | « chrome/renderer/extensions/dispatcher.cc ('k') | chrome/renderer/extensions/i18n_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698