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

Unified Diff: chrome/renderer/resources/extensions/content_watcher.js

Issue 12440030: Use utils.forEach everywhere rather than Array.prototype.forEach to guard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make foreach of an array give numbers Created 7 years, 9 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 | « chrome/renderer/resources/extensions/binding.js ('k') | chrome/renderer/resources/extensions/event.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/content_watcher.js
diff --git a/chrome/renderer/resources/extensions/content_watcher.js b/chrome/renderer/resources/extensions/content_watcher.js
index 4854f8cd3369b8fb939f60101fb370c18a84aac8..1fa21804eb706ae0baf78e5e63f56bf1835bdbe5 100644
--- a/chrome/renderer/resources/extensions/content_watcher.js
+++ b/chrome/renderer/resources/extensions/content_watcher.js
@@ -3,11 +3,12 @@
// found in the LICENSE file.
var contentWatcherNative = requireNative("contentWatcherNative");
+var forEach = require('utils').forEach;
-// Returns the indices in |css_selectors| that match any element on the page.
-exports.FindMatchingSelectors = function(css_selectors) {
+// Returns the indices in |cssSelectors| that match any element on the page.
+exports.FindMatchingSelectors = function(cssSelectors) {
var result = []
- css_selectors.forEach(function(selector, index) {
+ forEach(cssSelectors, function(index, selector) {
try {
if (document.querySelector(selector) != null)
result.push(index);
« no previous file with comments | « chrome/renderer/resources/extensions/binding.js ('k') | chrome/renderer/resources/extensions/event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698