0

[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:
eugenebut
2016-11-03 14:39:50 -07:00
committed by Commit bot
parent eff776983e
commit 02176404cf

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