Summary: We plan to place multiple globals in a single compartment to
reduce the memory overhead due to cross-compartment wrappers and the
performance overhead of traversing those wrappers. Globals will be
placed in the same compartment if: (1) they are same-origin (ignoring
document.domain) and (2) they are nested under the same toplevel
document. That is, a document can be same-compartment with a subframe,
but not with a new thing it opens via window.open().
There are various reasons for this last restriction, but it's mainly
there because we ran into performance/memory regressions due to things
not being collected as expeditiously as we'd like when we put things
from different toplevel loads in the same compartment.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1523843 though a bunch
of the work happened in the various depedencies of
https://bugzilla.mozilla.org/show_bug.cgi?id=1357862
Link to standard: No standard for the compartment bit per se. However,
in the course of this work we aligned our document.domain behavior to be
much more like other browsers, since we no longer have a compartment
boundary to revoke access to random objects when document.domain
changes. This part is arguably aligning us more closely with standards too.
Platforms: all
Target release: 67
Devtools bug: none needed.
Other engines: already implement the document.domain model we moved to.
web-platform-tests: I added some at
http://w3c-test.org/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_access_details.sub.html
(though note that the last two tests fail right now because of a bug in
the w3c-test.org harness).
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform