| 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
|
|
|