mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 771202 - Don't double-call OnWrapperDestroyed. r=bsmedberg
Calling OnWrapperDestroyed at this point in OnDestroy doesn't make sense, because the JS objects have a finalize hook that also calls OnWrapperDestroyed regardless of whether or not they still have a pointer stashed in their private. So when we do this, we get a bunch of assertions about unmatched calls to OnWrapperDestroyed. AFAICT the only reason this worked before is that this code never ran: I put a MOZ_ASSERT just before call to OnWrappedDestroyed in OnDestroy, and it never fired during the dom/plugins mochitests.
This commit is contained in:
parent
ba801827f7
commit
50c6d52c5a
@ -1782,7 +1782,7 @@ nsNPObjWrapper::OnDestroy(NPObject *npobj)
|
||||
// Remove the npobj from the hash now that it went away.
|
||||
PL_DHashTableRawRemove(&sNPObjWrappers, entry);
|
||||
|
||||
OnWrapperDestroyed();
|
||||
// The finalize hook will call OnWrapperDestroyed().
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user