-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 29438 - JSON.stringify as invoked by wrapKey can have side-effects depending on what you pass it #88
Comments
Use a clean global for the dictionary-to-ES conversion and the JSON.stringify. |
This will be fixed by PR #115 |
Not my area of expertise, but LGTM. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: