зеркало из https://github.com/mozilla/gecko-dev.git
fix a side effect of the fix to bug 32485. It turns out it is better to leak some native objects while shutting down then to fire off Release calls on those wrapped native objects and watch the browser crash
This commit is contained in:
Родитель
9680451c22
Коммит
7f5854b8f2
|
@ -412,7 +412,14 @@ nsXPCWrappedNative::Find(REFNSIID aIID)
|
|||
void
|
||||
nsXPCWrappedNative::SystemIsBeingShutDown()
|
||||
{
|
||||
NS_IF_RELEASE(mObj);
|
||||
// XXX It turns out that it is better to leak here then to do any Release's
|
||||
// and have them propagate into all sorts of mischief as the system is being
|
||||
// shutdown. This was learned the hard way :(
|
||||
|
||||
// mObj == nsnull is used to indicate that the wrapper is no longer valid
|
||||
// and that calls from JS should fail without trying to use any of the
|
||||
// xpconnect mechanisms. 'IsValid' is implemented by checking this pointer.
|
||||
mObj = nsnull;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
Загрузка…
Ссылка в новой задаче