Cross-global instanceof

Andrea Giammarchi andrea.giammarchi at gmail.com
Thu Oct 31 23:23:59 PDT 2013


also, your reviver would receive objects from the realm I am checking with
that code ... so your reviver will receive object from the **expected**
realm ... just to clarify, for future readers.

Still all ears listening to that case I've never, honestly, considered!

Thanks


On Thu, Oct 31, 2013 at 11:07 PM, Andrea Giammarchi <
andrea.giammarchi at gmail.com> wrote:

> Sure, so Allen asked me a real case to show, and I've done it. Now you
> please show me a real case when you pass a revival function to `JSON.parse`
> that is from another realm, explaining why, as I've done for mine, thanks.
>
> Best Regards
>
>
> On Thu, Oct 31, 2013 at 7:41 PM, Oliver Hunt <oliver at apple.com> wrote:
>
>>
>> On Nov 1, 2013, at 2:46 PM, Andrea Giammarchi <
>> andrea.giammarchi at gmail.com> wrote:
>>
>> > Allen, in which place on current known universe, when you parse a
>> JSON.string, your reviver function receives objects from another realm,
>> exactly?
>> Please try to keep the discourse polite.
>>
>> That said this is fairly trivial
>>
>> <realm a>
>> function reviver(…) { … }
>> </>
>>
>> <realm b>
>> JSON.parse(… <realm a>.reviver …)
>> </>
>>
>> now the realm of the objects created by the JSON object differ from the
>> realm that the reviver function is working in.
>>
>> —Oliver
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131031/5bcb6728/attachment.html>


More information about the es-discuss mailing list