mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 827471 - Improve CanSkipWrappedJS, r=mccr8
This commit is contained in:
parent
bc7fd07724
commit
f2c321d01d
@ -431,11 +431,12 @@ CanSkipWrappedJS(nsXPCWrappedJS *wrappedJS)
|
||||
// If traversing wrappedJS wouldn't release it, nor
|
||||
// cause any other objects to be added to the graph, no
|
||||
// need to add it to the graph at all.
|
||||
bool isRootWrappedJS = wrappedJS->GetRootWrapper() == wrappedJS;
|
||||
if (nsCCUncollectableMarker::sGeneration &&
|
||||
(!obj || !xpc_IsGrayGCThing(obj)) &&
|
||||
!wrappedJS->IsSubjectToFinalization() &&
|
||||
wrappedJS->GetRootWrapper() == wrappedJS) {
|
||||
if (!wrappedJS->IsAggregatedToNative()) {
|
||||
(isRootWrappedJS || CanSkipWrappedJS(wrappedJS->GetRootWrapper()))) {
|
||||
if (!wrappedJS->IsAggregatedToNative() || !isRootWrappedJS) {
|
||||
return true;
|
||||
} else {
|
||||
nsISupports* agg = wrappedJS->GetAggregatedNativeObject();
|
||||
|
Loading…
Reference in New Issue
Block a user