W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2014

Re: Determining what prototype should be used for an object

From: Adam Klein <adamk@chromium.org>
Date: Fri, 14 Nov 2014 11:32:24 -0800
Message-ID: <CAEvLGc+Hna0KvrmufoueBBh-SPxOuVAR8KS6=E2GyQEVO=YeAg@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:23 UTC