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

Unified Diff: trunk/src/chrome/renderer/resources/extensions/event.js

Issue 23945003: Revert 221619 "Initial chrome.mdns API." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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: trunk/src/chrome/renderer/resources/extensions/event.js
===================================================================
--- trunk/src/chrome/renderer/resources/extensions/event.js (revision 221667)
+++ trunk/src/chrome/renderer/resources/extensions/event.js (working copy)
@@ -228,7 +228,7 @@
// 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 = [];
+ var listenerIDs = null;
if (filteringInfo)
listenerIDs = eventNatives.MatchAgainstEventFilter(name, filteringInfo);
@@ -262,11 +262,7 @@
if (!this.eventOptions_.supportsFilters)
throw new Error("This event does not support filters.");
if (filters.url && !(filters.url instanceof Array))
- throw new Error("filters.url should be an array.");
- if (filters.serviceType &&
- !(typeof filters.serviceType === 'string')) {
- throw new Error("filters.serviceType should be a string.")
- }
+ throw new Error("filters.url should be an array");
}
var listener = {callback: cb, filters: filters};
this.attach_(listener);

Powered by Google App Engine
This is Rietveld 408576698