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

Side by Side Diff: ios/web/web_state/js/resources/common.js

Issue 2475643003: [ios] Use square brackets syntax for nulling out toJSON property. (Closed)
Patch Set: Created 4 years, 1 month 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
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file provides common methods that can be shared by other JavaScripts. 5 // This file provides common methods that can be shared by other JavaScripts.
6 6
7 goog.provide('__crWeb.common'); 7 goog.provide('__crWeb.common');
8 8
9 goog.require('__crWeb.base'); 9 goog.require('__crWeb.base');
10 10
(...skipping 19 matching lines...) Expand all
30 * JSON safe object to protect against custom implementation of Object.toJSON 30 * JSON safe object to protect against custom implementation of Object.toJSON
31 * in host pages. 31 * in host pages.
32 * @constructor 32 * @constructor
33 */ 33 */
34 __gCrWeb.common.JSONSafeObject = function JSONSafeObject() { 34 __gCrWeb.common.JSONSafeObject = function JSONSafeObject() {
35 }; 35 };
36 36
37 /** 37 /**
38 * Protect against custom implementation of Object.toJSON in host pages. 38 * Protect against custom implementation of Object.toJSON in host pages.
39 */ 39 */
40 __gCrWeb.common.JSONSafeObject.prototype.toJSON = null; 40 __gCrWeb.common.JSONSafeObject.prototype['toJSON'] = null;
41 41
42 /** 42 /**
43 * Retain the original JSON.stringify method where possible to reduce the 43 * Retain the original JSON.stringify method where possible to reduce the
44 * impact of sites overriding it 44 * impact of sites overriding it
45 */ 45 */
46 __gCrWeb.common.JSONStringify = JSON.stringify; 46 __gCrWeb.common.JSONStringify = JSON.stringify;
47 47
48 /** 48 /**
49 * Prefix used in references to form elements that have no 'id' or 'name' 49 * Prefix used in references to form elements that have no 'id' or 'name'
50 */ 50 */
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 var plugins = findPluginNodesWithoutFallback_(); 683 var plugins = findPluginNodesWithoutFallback_();
684 if (plugins.length > 0) { 684 if (plugins.length > 0) {
685 // Store the list of plugins in a known place for the replacement script 685 // Store the list of plugins in a known place for the replacement script
686 // to use, then trigger it. 686 // to use, then trigger it.
687 __gCrWeb['placeholderTargetPlugins'] = plugins; 687 __gCrWeb['placeholderTargetPlugins'] = plugins;
688 return true; 688 return true;
689 } 689 }
690 return false; 690 return false;
691 }; 691 };
692 }()); // End of anonymous object 692 }()); // End of anonymous object
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