[ios] Use square brackets syntax for nulling out toJSON property.
Closure reports an error for the old code: ../../ios/web/web_state/js/resources/common.js:40: ERROR - assignment to property toJSON of __gCrWeb.common.JSONSafeObject.prototype found : null required: function (this:Object, string=): * __gCrWeb.common.JSONSafeObject.prototype.toJSON = null; ^ BUG=None Review-Url: https://codereview.chromium.org/2475643003 Cr-Commit-Position: refs/heads/master@{#429702}
This commit is contained in:
@ -37,7 +37,7 @@ __gCrWeb['common'] = __gCrWeb.common;
|
||||
/**
|
||||
* Protect against custom implementation of Object.toJSON in host pages.
|
||||
*/
|
||||
__gCrWeb.common.JSONSafeObject.prototype.toJSON = null;
|
||||
__gCrWeb.common.JSONSafeObject.prototype['toJSON'] = null;
|
||||
|
||||
/**
|
||||
* Retain the original JSON.stringify method where possible to reduce the
|
||||
|
Reference in New Issue
Block a user