Bug 1032125: Part 3: Don't send frame messages to Nuwa process after Nuwa has frozen. r=khuey
☠☠ backed out by 52082f0b19e6 ☠ ☠
authorPatrick Wang (Chih-Kai Wang) <kk1fff@patrickz.net>
Fri, 19 Sep 2014 17:12:57 +0800
changeset 206215 422fd81a4118e76879a529fd53ddaef0b21d0bc4
parent 206214 e193cf8cb61640a25590fdecb2231317e4afcf4a
child 206216 36a3cc973ef856934cfe3e538d43676668e41cbb
push id27516
push userryanvm@gmail.com
push dateFri, 19 Sep 2014 17:54:48 +0000
treeherdermozilla-central@b00bdb144e06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1032125
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1032125: Part 3: Don't send frame messages to Nuwa process after Nuwa has frozen. r=khuey
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -3676,16 +3676,22 @@ ContentParent::DoSendAsyncMessage(JSCont
     ClonedMessageData data;
     if (!BuildClonedMessageDataForParent(this, aData, data)) {
         return false;
     }
     InfallibleTArray<CpowEntry> cpows;
     if (aCpows && !GetCPOWManager()->Wrap(aCx, aCpows, &cpows)) {
         return false;
     }
+#ifdef MOZ_NUWA_PROCESS
+    if (IsNuwaProcess() && IsNuwaReady()) {
+        // Nuwa won't receive frame messages after it is frozen.
+        return true;
+    }
+#endif
     return SendAsyncMessage(nsString(aMessage), data, cpows, Principal(aPrincipal));
 }
 
 bool
 ContentParent::CheckPermission(const nsAString& aPermission)
 {
     return AssertAppProcessPermission(this, NS_ConvertUTF16toUTF8(aPermission).get());
 }