mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 927939 - Wrappers for nursery allocated objects should be finalized in the background r=terrence
This commit is contained in:
parent
80ebb51518
commit
3219a5619c
@ -181,9 +181,12 @@ bool Wrapper::finalizeInBackground(Value priv)
|
||||
/*
|
||||
* Make the 'background-finalized-ness' of the wrapper the same as the
|
||||
* wrapped object, to allow transplanting between them.
|
||||
*
|
||||
* If the wrapped object is in the nursery then we know it doesn't have a
|
||||
* finalizer, and so background finalization is ok.
|
||||
*/
|
||||
if (IsInsideNursery(priv.toObject().runtimeFromMainThread(), &priv.toObject()))
|
||||
return false;
|
||||
return true;
|
||||
return IsBackgroundFinalized(priv.toObject().tenuredGetAllocKind());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user