Re: Determining what prototype should be used for an object

On Fri, Nov 14, 2014 at 11:11 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 11/14/14, 1:48 PM, Allen Wirfs-Brock wrote:
>>
>> If you think about it this way, then I would expect that all of the
>> context values would be associated with the same realm as the
>> HTMLCanvasElement instance.
>>
>
> Right.  Except of course ES has no notion of objects being associated with
> Realms.  ;)
>
> So for Web IDL, to support use cases like this, it seems like we do in
> fact want to associate objects to Realms at creation time.
>

Are you proposing this just for Web IDL, or to associate all ES objects
with a Realm at creation time? I ask for two reasons:

1) V8 currently associates objects with a Realm, but would like to move
away from that for a variety of implementation reasons.

2) The V8 implementation of Object.getNotifier() (part of the
Object.observe spec) does exactly this sort of "create an object from a
prototype" thing, and it's become clear that we need to better-define what
Realm the notifier is created in.

- Adam

Received on Friday, 14 November 2014 19:32:51 UTC