зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1429945 - Make ghost window unlinker e10s compatible. r=smaug
Content processes can contain ghost windows, so the debug-only ghost window unlinker needs to send a message to child processes to get them to run it, too. MozReview-Commit-ID: 9Ffc3SDNDJB --HG-- extra : rebase_source : 875891e9332cf41c4157d246b71c2c361cab4aa6
This commit is contained in:
Родитель
c098819616
Коммит
4a0dd8ce9d
|
@ -137,6 +137,7 @@
|
|||
#ifdef NS_PRINTING
|
||||
#include "nsPrintingProxy.h"
|
||||
#endif
|
||||
#include "nsWindowMemoryReporter.h"
|
||||
|
||||
#include "IHistory.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
@ -2654,6 +2655,15 @@ ContentChild::RecvCycleCollect()
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
ContentChild::RecvUnlinkGhosts()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsWindowMemoryReporter::UnlinkGhostWindows();
|
||||
#endif
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID,
|
||||
const nsCString& name, const nsCString& UAName,
|
||||
|
|
|
@ -410,6 +410,7 @@ public:
|
|||
|
||||
virtual mozilla::ipc::IPCResult RecvGarbageCollect() override;
|
||||
virtual mozilla::ipc::IPCResult RecvCycleCollect() override;
|
||||
virtual mozilla::ipc::IPCResult RecvUnlinkGhosts() override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvAppInfo(const nsCString& version, const nsCString& buildID,
|
||||
const nsCString& name, const nsCString& UAName,
|
||||
|
|
|
@ -578,6 +578,7 @@ static const char* sObserverTopics[] = {
|
|||
"child-gc-request",
|
||||
"child-cc-request",
|
||||
"child-mmu-request",
|
||||
"child-ghost-request",
|
||||
"last-pb-context-exited",
|
||||
"file-watcher-update",
|
||||
#ifdef ACCESSIBILITY
|
||||
|
@ -2848,6 +2849,9 @@ ContentParent::Observe(nsISupports* aSubject,
|
|||
else if (!strcmp(aTopic, "child-mmu-request")){
|
||||
Unused << SendMinimizeMemoryUsage();
|
||||
}
|
||||
else if (!strcmp(aTopic, "child-ghost-request")){
|
||||
Unused << SendUnlinkGhosts();
|
||||
}
|
||||
else if (!strcmp(aTopic, "last-pb-context-exited")) {
|
||||
Unused << SendLastPrivateDocShellDestroyed();
|
||||
}
|
||||
|
|
|
@ -455,6 +455,7 @@ child:
|
|||
|
||||
async GarbageCollect();
|
||||
async CycleCollect();
|
||||
async UnlinkGhosts();
|
||||
|
||||
/**
|
||||
* Start accessibility engine in content process.
|
||||
|
|
|
@ -2457,6 +2457,14 @@ nsXPCComponents_Utils::UnlinkGhostWindows()
|
|||
{
|
||||
#ifdef DEBUG
|
||||
nsWindowMemoryReporter::UnlinkGhostWindows();
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsCOMPtr<nsIObserverService> obsvc = services::GetObserverService();
|
||||
if (obsvc) {
|
||||
obsvc->NotifyObservers(nullptr, "child-ghost-request", nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
|
Загрузка…
Ссылка в новой задаче