On 10/15/14, 3:05 PM, Allen Wirfs-Brock wrote:
The above expression must be evaluated as part of some job running in a
Vat V. The code of the expression must be associated with some Realm R
within V.

Correct.

17. Execution continues in this manner (essentially looping steps 8-16
    with new Jn jobs) as long as V continues to execute jobs.

Right, this is the behavior that's not really desirable in the context of the web.

So, the basic question becomes one how the browser maps web pages to
Vats. If each pages get a separate Vat

They don't. Basically, same-origin web pages correspond to multiple Realms within a single Vat, since from their point of view direct object references exist between them.

Worse yet, different-origin web pages might be able to become same-origin (due to document.domain).

So in practice in a web browser a bunch of different web pages are all separate Realms in the same Vat.

If the entire browser environment was represent
as one vat then the loop continues as long as the browser is running.

Yes, this is precisely the failure mode in Firefox right now.

For example, perhaps it could purge all Jn jobs if Realm R is destroyed.

You can't really "destroy" a realm while someone is holding references to functions from that realm, yes?

What Gecko does do is mark a realm that corresponds to a navigated-away-from web page (but NOT a web page loaded in an <iframe> that is then removed from the DOM, for web compat reasons) as "inactive", and Web IDL callbacks that are backed by functions from such a Realm become no-ops. Functions in that Realm can still be called directly, but not via a Web IDL callback.

Other browsers do different things here.

So, it all comes back to what is the mapping between various browser
concepts and the above ES concepts.  BTW, I'm not saying that the ES
model can't evolve to make it easier to describe browser semantics, but
this is our starting point for discussion.

Sure.

-Boris

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to