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

Unified Diff: chrome/renderer/resources/extensions/app_runtime_custom_bindings.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 | « no previous file | chrome/renderer/resources/extensions/binding.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/app_runtime_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js b/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js
index a50c96407ca99b5c153e203c8130aa7d942a7ab8..d17d2e55fa76c8696fe26e0b90475b1af60ca3d9 100644
--- a/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js
@@ -9,6 +9,7 @@ var binding = require('binding').Binding.create('app.runtime');
var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var chrome = requireNative('chrome').GetChrome();
var fileSystemHelpers = requireNative('file_system_natives');
+var forEach = require('utils').forEach;
var GetIsolatedFileSystem = fileSystemHelpers.GetIsolatedFileSystem;
var appNatives = requireNative('app_runtime');
var DeserializeString = appNatives.DeserializeString;
@@ -38,7 +39,7 @@ chromeHidden.Event.registerArgumentMassager('app.runtime.onLaunched',
}
}
};
- launchData.items.forEach(function(item) {
+ forEach(launchData.items, function(i, item) {
var fs = GetIsolatedFileSystem(item.fileSystemId);
fs.root.getFile(item.baseName, {}, function(fileEntry) {
itemLoaded(null, { entry: fileEntry, type: item.mimeType });
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/binding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698