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

Side by Side Diff: chrome/renderer/resources/event_bindings.js

Issue 2796005: Merge 48843 - Change 'const' to 'var' in event_bindings.js for ECMAScript com... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var chrome = chrome || {}; 5 var chrome = chrome || {};
6 (function () { 6 (function () {
7 native function GetChromeHidden(); 7 native function GetChromeHidden();
8 native function AttachEvent(eventName); 8 native function AttachEvent(eventName);
9 native function DetachEvent(eventName); 9 native function DetachEvent(eventName);
10 10
11 var chromeHidden = GetChromeHidden(); 11 var chromeHidden = GetChromeHidden();
12 12
13 // Local implementation of JSON.parse & JSON.stringify that protect us 13 // Local implementation of JSON.parse & JSON.stringify that protect us
14 // from being clobbered by an extension. 14 // from being clobbered by an extension.
15 chromeHidden.JSON = new (function() { 15 chromeHidden.JSON = new (function() {
16 const $Object = Object; 16 var $Object = Object;
17 const $Array = Array; 17 var $Array = Array;
18 const $jsonStringify = JSON.stringify; 18 var $jsonStringify = JSON.stringify;
19 const $jsonParse = JSON.parse; 19 var $jsonParse = JSON.parse;
20 20
21 this.stringify = function(thing) { 21 this.stringify = function(thing) {
22 var customizedObjectToJSON = $Object.prototype.toJSON; 22 var customizedObjectToJSON = $Object.prototype.toJSON;
23 var customizedArrayToJSON = $Array.prototype.toJSON; 23 var customizedArrayToJSON = $Array.prototype.toJSON;
24 if (customizedObjectToJSON !== undefined) { 24 if (customizedObjectToJSON !== undefined) {
25 $Object.prototype.toJSON = null; 25 $Object.prototype.toJSON = null;
26 } 26 }
27 if (customizedArrayToJSON !== undefined) { 27 if (customizedArrayToJSON !== undefined) {
28 $Array.prototype.toJSON = null; 28 $Array.prototype.toJSON = null;
29 } 29 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 var event = allAttachedEvents[i]; 219 var event = allAttachedEvents[i];
220 if (event) 220 if (event)
221 event.detach_(); 221 event.detach_();
222 } 222 }
223 } 223 }
224 224
225 chromeHidden.dispatchError = function(msg) { 225 chromeHidden.dispatchError = function(msg) {
226 console.error(msg); 226 console.error(msg);
227 } 227 }
228 })(); 228 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698