mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 918479 - Remove listeners from a message manager if the child side dies, r=fabrice
--HG-- extra : rebase_source : 1e3b0fb36c5e489225bca8ea42b5bf21eb7d7755
This commit is contained in:
parent
3ed9c2e5d6
commit
9bef96b103
@ -294,7 +294,9 @@ TabParent::ActorDestroy(ActorDestroyReason why)
|
||||
}
|
||||
nsRefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
nsRefPtr<nsFrameMessageManager> fmm;
|
||||
if (frameLoader) {
|
||||
fmm = frameLoader->GetFrameMessageManager();
|
||||
nsCOMPtr<Element> frameElement(mFrameElement);
|
||||
ReceiveMessage(CHILD_PROCESS_SHUTDOWN_MESSAGE, false, nullptr, nullptr);
|
||||
frameLoader->DestroyChild();
|
||||
@ -311,6 +313,9 @@ TabParent::ActorDestroy(ActorDestroyReason why)
|
||||
if (os) {
|
||||
os->NotifyObservers(NS_ISUPPORTS_CAST(nsITabParent*, this), "ipc:browser-destroyed", nullptr);
|
||||
}
|
||||
if (fmm) {
|
||||
fmm->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user