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

Unified Diff: ios/web/web_state/js/resources/common.js

Issue 2449333002: [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)
Patch Set: Added back @public Created 4 years, 2 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 | « ios/web/web_state/js/resources/base.js ('k') | ios/web/web_state/js/resources/message.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/resources/common.js
diff --git a/ios/web/web_state/js/resources/common.js b/ios/web/web_state/js/resources/common.js
index 9e13a41d752d899ce5ef2bdec164a8809cb84587..7796fc243975adf078a4d9870935b73bbc4490ee 100644
--- a/ios/web/web_state/js/resources/common.js
+++ b/ios/web/web_state/js/resources/common.js
@@ -14,7 +14,12 @@ goog.require('__crWeb.base');
* injected. String 'common' is used in |__gCrWeb['common']| as it needs to be
* accessed in Objective-C code.
*/
-__gCrWeb['common'] = {};
+__gCrWeb.common = {};
+
+// Store common namespace object in a global __gCrWeb object referenced by a
+// string, so it does not get renamed by closure compiler during the
+// minification.
+__gCrWeb['common'] = __gCrWeb.common;
/* Beginning of anonymous object. */
(function() {
@@ -23,13 +28,13 @@ __gCrWeb['common'] = {};
* in host pages.
* @constructor
*/
- __gCrWeb['common'].JSONSafeObject = function JSONSafeObject() {
+ __gCrWeb.common.JSONSafeObject = function JSONSafeObject() {
};
/**
* Protect against custom implementation of Object.toJSON in host pages.
*/
- __gCrWeb['common'].JSONSafeObject.prototype.toJSON = null;
+ delete __gCrWeb.common.JSONSafeObject.prototype.toJSON;
/**
* Retain the original JSON.stringify method where possible to reduce the
« no previous file with comments | « ios/web/web_state/js/resources/base.js ('k') | ios/web/web_state/js/resources/message.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698