bug 1329814 - fix race condition when shutting down a tab r=smaug

When TabChild recieves the Destroy message from its parent the doc accessibles
for that tab are shut down.  However if the Shutdown message sent by
DocAccessible::Shutdown() isn't recieved before the child process handles the
runnable that sends __delete__ to the tab parent actor the parent can send a
message to the already shut down doc accessible child actor.
This commit is contained in:
Trevor Saunders 2017-01-09 18:55:32 -05:00
parent c5ffb0976b
commit ae8b177c6c

View File

@ -359,6 +359,10 @@ TabParent::DestroyInternal()
RemoveWindowListeners();
if (DocAccessibleParent* tabDoc = GetTopLevelDocAccessible()) {
tabDoc->Destroy();
}
// If this fails, it's most likely due to a content-process crash,
// and auto-cleanup will kick in. Otherwise, the child side will
// destroy itself and send back __delete__().