[Bug 29438] JSON.stringify as invoked by wrapKey can have side-effects depending on what you pass it

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29438

--- Comment #2 from Boris Zbarsky <bzbarsky@mit.edu> ---
What Gecko does in practice right now is that it converts the dictionary to a
JS object in a new clean global, then does JSON.stringify on the result.  Since
the global has clean prototypes and none of the dictionary members in this case
have names that have any special meaning to the JSON.stringify algorithm this
works out to no observable effects, I believe...

Another option would be a modified version of JSON.stringify with
http://www.ecma-international.org/ecma-262/6.0/#sec-serializejsonproperty step
3 skipped.  I _think_ that this is sufficient to make things non-observable as
well, and equivalent to the clean-global approach.  Would need careful
checking.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 9 February 2016 01:39:00 UTC