Bug 1151672 - Part 2: Block PHal::Msg_NotifyNetworkChange__ID to the Nuwa process after it is ready. r=khuey
authorCervantes Yu <cyu@mozilla.com>
Fri, 22 May 2015 15:08:20 +0800
changeset 266160 dd47867000d3042ae570b31d428f6625c8a9dc13
parent 266159 2529aa82e2005c68f2c824cc354381d31fb15cbd
child 266161 7e71880f7a2e75d4815691a90973e258ef1694d9
push id2231
push usermichael.l.comella@gmail.com
push dateFri, 22 May 2015 20:04:59 +0000
reviewerskhuey
bugs1151672
milestone41.0a1
Bug 1151672 - Part 2: Block PHal::Msg_NotifyNetworkChange__ID to the Nuwa process after it is ready. r=khuey
ipc/glue/MessageLink.cpp
--- a/ipc/glue/MessageLink.cpp
+++ b/ipc/glue/MessageLink.cpp
@@ -9,16 +9,17 @@
 #include "mozilla/ipc/MessageChannel.h"
 #include "mozilla/ipc/BrowserProcessSubThread.h"
 #include "mozilla/ipc/ProtocolUtils.h"
 
 #ifdef MOZ_NUWA_PROCESS
 #include "ipc/Nuwa.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/ContentParent.h"
+#include "mozilla/hal_sandbox/PHalParent.h"
 #endif
 
 #include "mozilla/Assertions.h"
 #include "mozilla/DebugOnly.h"
 #include "nsDebug.h"
 #include "nsISupportsImpl.h"
 #include "nsXULAppAPI.h"
 
@@ -173,16 +174,17 @@ ProcessLink::SendMessage(Message *msg)
     mChan->mMonitor->AssertCurrentThreadOwns();
 
 #ifdef MOZ_NUWA_PROCESS
     if (mIsToNuwaProcess && mozilla::dom::ContentParent::IsNuwaReady()) {
         switch (msg->type()) {
         case mozilla::dom::PContent::Msg_NuwaFork__ID:
         case mozilla::dom::PContent::Reply_AddNewProcess__ID:
         case mozilla::dom::PContent::Msg_NotifyPhoneStateChange__ID:
+        case mozilla::hal_sandbox::PHal::Msg_NotifyNetworkChange__ID:
         case GOODBYE_MESSAGE_TYPE:
             break;
         default:
 #ifdef DEBUG
             MOZ_CRASH();
 #else
             // In optimized build, message will be dropped.
             printf_stderr("Sending message to frozen Nuwa");