Closed
Bug 1363214
Opened 7 years ago
Closed 6 years ago
Split JS::Compartment from JS::Realm
Categories
(Core :: JavaScript Engine, enhancement, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla62
People
(Reporter: jorendorff, Assigned: jandem)
References
Details
Attachments
(1 file)
(deleted),
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
To support same-compartment realms, we factor out a Compartment class so
that Compartment and Realm are no longer identical inside js/src.
However, initially there will be no way to create multiple Realms in the
same Compartment, so they'll still be one-to-one.
Each Realm has a pointer to its freshly factored-out Compartment.
All Wrapper stuff moves from JS::Realm to the new JS::Compartment.
Initially, JS::Compartment also contains a pointer to its sole Realm.
(It will be eliminated later.)
To make way for JS::Compartment, js::wasm::Compartment will have to be
renamed to js::wasm::WasmCompartment.
Updated•7 years ago
|
status-firefox60:
--- → fix-optional
Priority: -- → P2
Assignee | ||
Comment 1•6 years ago
|
||
On top of the other changes, this is now pretty straight-forward.
JS::GetCompartmentForRealm still exists, it uses JS::shadow::Realm that contains just the compartment pointer. Internally, JS::Realm inherits from JS::shadow::Realm.
Memory reporting of a zone now uses a compartments/ subtree for the compartment data (the JSCompartment objects themselves, the wrapper tables, the XPConnect private data).
Comment 2•6 years ago
|
||
Comment on attachment 8982981 [details] [diff] [review]
Remove JS::Realm/JSCompartment inheritance
Review of attachment 8982981 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/TypeInference.cpp
@@ +4590,1 @@
> Zone::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
Huh, why is this defined here?
Attachment #8982981 -
Flags: review?(jcoppeard) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/011f238cc9ab
Remove JS::Realm/JSCompartment inheritance. r=jonco
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #2)
> ::: js/src/vm/TypeInference.cpp
> @@ +4590,1 @@
> > Zone::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
>
> Huh, why is this defined here?
Looking at the history of this code in searchfox, I think initially the Zone memory reporting code only measured the TI data so that's probably why it's still in TypeInference.cpp ..
Comment 5•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•