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

Unified Diff: chrome/renderer/resources/extensions/web_view_experimental.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/web_view.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/web_view_experimental.js
diff --git a/chrome/renderer/resources/extensions/web_view_experimental.js b/chrome/renderer/resources/extensions/web_view_experimental.js
index d7e80bdcb0ba43a2c7f36c6def85a01cfb8aa35c..8802d5b313470133c2f3afadf2a898abf1b63d5e 100644
--- a/chrome/renderer/resources/extensions/web_view_experimental.js
+++ b/chrome/renderer/resources/extensions/web_view_experimental.js
@@ -13,6 +13,8 @@
var WebView = require('webView').WebView;
+var forEach = require('utils').forEach;
+
/** @type {Array.<string>} */
var PERMISSION_TYPES = ['media', 'geolocation', 'pointerLock'];
@@ -37,7 +39,7 @@ WebView.prototype.maybeSetupPermissionEvent_ = function() {
this.objectNode_.addEventListener('-internal-permissionrequest', function(e) {
var evt = new Event('permissionrequest', {bubbles: true, cancelable: true});
var detail = e.detail ? JSON.parse(e.detail) : {};
- EXPOSED_PERMISSION_EVENT_ATTRIBS.forEach(function(attribName) {
+ forEach(EXPOSED_PERMISSION_EVENT_ATTRIBS, function(i, attribName) {
if (detail[attribName] !== 'undefined')
evt[attribName] = detail[attribName];
});
« no previous file with comments | « chrome/renderer/resources/extensions/web_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698