mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 797821 - Loosen the CompartmentPrivate contract so that having one does not imply being in the compartment set. r=mrbkap
The compartment set goes away in later patches anyway. This is to allow us to create compartment privates for things like XUL prototype document globals without having to put them in the set and trace expandos and such.
This commit is contained in:
parent
3b50be121c
commit
961bc14d2b
@ -231,18 +231,8 @@ CompartmentDestroyedCallback(JSFreeOp *fop, JSCompartment *compartment)
|
||||
nsAutoPtr<CompartmentPrivate> priv(GetCompartmentPrivate(compartment));
|
||||
JS_SetCompartmentPrivate(compartment, nullptr);
|
||||
|
||||
// JSD creates compartments in our runtime without going through our creation
|
||||
// code. This means that those compartments aren't in our set, and don't have
|
||||
// compartment privates. JSD is on the way out, so let's just handle that
|
||||
// case for now.
|
||||
if (!priv) {
|
||||
MOZ_ASSERT(!set.has(compartment));
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the compartment from the set.
|
||||
MOZ_ASSERT(set.has(compartment));
|
||||
set.remove(compartment);
|
||||
if (set.has(compartment))
|
||||
set.remove(compartment);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user