mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 948774: Don't broadcast a memory report request to the Nuwa process. r=fabrice
This commit is contained in:
parent
c34b5523fe
commit
9b68f75608
@ -1238,12 +1238,14 @@ ContentParent::ContentParent(mozIApplication* aApp,
|
||||
bool aIsNuwaProcess /* = false */)
|
||||
: mOSPrivileges(aOSPrivileges)
|
||||
, mIsForBrowser(aIsForBrowser)
|
||||
, mIsNuwaProcess(aIsNuwaProcess)
|
||||
{
|
||||
InitializeMembers(); // Perform common initialization.
|
||||
|
||||
// No more than one of !!aApp, aIsForBrowser, and aIsForPreallocated should
|
||||
// be true.
|
||||
MOZ_ASSERT(!!aApp + aIsForBrowser + aIsForPreallocated <= 1);
|
||||
// No more than one of !!aApp, aIsForBrowser, aIsForPreallocated, and
|
||||
// aIsNuwaProcess should be true.
|
||||
MOZ_ASSERT(!!aApp + aIsForBrowser + aIsForPreallocated + aIsNuwaProcess <=
|
||||
1);
|
||||
|
||||
// Insert ourselves into the global linked list of ContentParent objects.
|
||||
if (!sContentParents) {
|
||||
@ -1317,6 +1319,7 @@ ContentParent::ContentParent(ContentParent* aTemplate,
|
||||
: mOSPrivileges(aOSPrivileges)
|
||||
, mAppManifestURL(aAppManifestURL)
|
||||
, mIsForBrowser(false)
|
||||
, mIsNuwaProcess(false)
|
||||
{
|
||||
InitializeMembers(); // Perform common initialization.
|
||||
|
||||
@ -1497,6 +1500,14 @@ ContentParent::IsForApp()
|
||||
return !mAppManifestURL.IsEmpty();
|
||||
}
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
bool
|
||||
ContentParent::IsNuwaProcess()
|
||||
{
|
||||
return mIsNuwaProcess;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t
|
||||
ContentParent::Pid()
|
||||
{
|
||||
@ -1882,7 +1893,10 @@ ContentParent::Observe(nsISupports* aSubject,
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
else if (!strcmp(aTopic, "child-memory-reporter-request")) {
|
||||
unused << SendPMemoryReportRequestConstructor((uint32_t)(uintptr_t)aData);
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
if (!IsNuwaProcess())
|
||||
#endif
|
||||
unused << SendPMemoryReportRequestConstructor((uint32_t)(uintptr_t)aData);
|
||||
}
|
||||
else if (!strcmp(aTopic, "child-gc-request")){
|
||||
unused << SendGarbageCollect();
|
||||
|
@ -145,6 +145,9 @@ public:
|
||||
|
||||
bool IsAlive();
|
||||
bool IsForApp();
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
bool IsNuwaProcess();
|
||||
#endif
|
||||
|
||||
GeckoChildProcessHost* Process() {
|
||||
return mSubprocess;
|
||||
@ -560,6 +563,7 @@ private:
|
||||
|
||||
bool mSendPermissionUpdates;
|
||||
bool mIsForBrowser;
|
||||
bool mIsNuwaProcess;
|
||||
|
||||
// These variables track whether we've called Close(), CloseWithError()
|
||||
// and KillHard() on our channel.
|
||||
|
Loading…
Reference in New Issue
Block a user