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

Unified Diff: extensions/renderer/resources/event.js

Issue 2924683002: [Extensions Bindings] Avoid passing the event filter to JS (Closed)
Patch Set: rebase 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
« no previous file with comments | « extensions/renderer/js_extension_bindings_system.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/event.js
diff --git a/extensions/renderer/resources/event.js b/extensions/renderer/resources/event.js
index 2cbf48b9ef98cb3918edbc89d03bd2e0ce90b75e..9e7226be14d7007c0867551aeefd11354dbcecac 100644
--- a/extensions/renderer/resources/event.js
+++ b/extensions/renderer/resources/event.js
@@ -241,18 +241,15 @@
// Dispatches a named event with the given argument array. The args array is
// the list of arguments that will be sent to the event callback.
- function dispatchEvent(name, args, filteringInfo) {
- var listenerIDs = [];
-
- if (filteringInfo)
- listenerIDs = eventNatives.MatchAgainstEventFilter(name, filteringInfo);
-
+ // |listenerIds| contains the ids of matching listeners, or is an empty array
+ // for all listeners.
+ function dispatchEvent(name, args, listenerIds) {
var event = attachedNamedEvents[name];
if (!event)
return;
var dispatchArgs = function(args) {
- var result = event.dispatch_(args, listenerIDs);
+ var result = event.dispatch_(args, listenerIds);
if (result)
logging.DCHECK(!result.validationErrors, result.validationErrors);
return result;
« no previous file with comments | « extensions/renderer/js_extension_bindings_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698