the Notifier is lazily instantiated and I believe not enumerable so
JSON.stringify should ever expose this property.

Moreover, it does not look like there is a {}.__notifier__ property
anywhere, Object.getNotifier(obj) is required indeed so a WeakMap that
relates the obj, and its notifier, cannot be serialized in a meaningful way
via JSON.stringify neither.

As summary, and correct me if I am wrong, Object.observe is safe, also
because observers are callbacks and these, again, cannot be represented in
a meaningful way in JSON.

br

On Fri, Aug 17, 2012 at 10:50 AM, gaz Heyes <gazhe...@gmail.com> wrote:

> Hi Rafael
>
> Would this proposal work on the Object prototype? If so then it could be
> used for JSON hijacking. I'd recommend it didn't.
>
> Cheers
>
> Gareth
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to