You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let json be the result of representing key as a UTF-16 string conforming to the
JSON grammar; for example, by executing the JSON.stringify algorithm specified
in ECMA262.
This needs to clearly define where the objects passed to JSON.stringify are coming from, because JSON.stringify will do things like get .toJSON properties and call them, so if the objects come from the page global and someone defines a .toJSON on Object.prototype in the page, that will get invoked during this process. Maybe the intent is that there be no observable side-effects; in that case the behavior needs to be clearly specified so as to avoid them.
The text was updated successfully, but these errors were encountered:
Bug 29438:
The spec says:
Let json be the result of representing key as a UTF-16 string conforming to the
JSON grammar; for example, by executing the JSON.stringify algorithm specified
in ECMA262.
This needs to clearly define where the objects passed to JSON.stringify are coming from, because JSON.stringify will do things like get .toJSON properties and call them, so if the objects come from the page global and someone defines a .toJSON on Object.prototype in the page, that will get invoked during this process. Maybe the intent is that there be no observable side-effects; in that case the behavior needs to be clearly specified so as to avoid them.
The text was updated successfully, but these errors were encountered: