From aa9eb4673ec2de40f6a5bcf8f2b341c1cd607dcf Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Mon, 22 Sep 2014 12:45:48 +0200 Subject: [PATCH] Backed out changeset 0b73bd6d5d9c (bug 1032125) for causing regressions --- dom/ipc/ContentParent.cpp | 3 --- dom/ipc/ContentParent.h | 5 ----- ipc/glue/MessageLink.cpp | 22 ---------------------- ipc/glue/MessageLink.h | 3 --- 4 files changed, 33 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 7019b0e7495..eabea5e8d74 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -341,7 +341,6 @@ namespace mozilla { namespace dom { #ifdef MOZ_NUWA_PROCESS -int32_t ContentParent::sNuwaPid = 0; bool ContentParent::sNuwaReady = false; #endif @@ -587,7 +586,6 @@ ContentParent::RunNuwaProcess() /* aIsNuwaProcess = */ true); nuwaProcess->Init(); #ifdef MOZ_NUWA_PROCESS - sNuwaPid = nuwaProcess->Pid(); sNuwaReady = false; #endif return nuwaProcess.forget(); @@ -1989,7 +1987,6 @@ ContentParent::~ContentParent() #ifdef MOZ_NUWA_PROCESS if (IsNuwaProcess()) { sNuwaReady = false; - sNuwaPid = 0; } #endif } diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 903a8188d80..736dab0fe96 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -79,10 +79,6 @@ class ContentParent MOZ_FINAL : public PContentParent public: #ifdef MOZ_NUWA_PROCESS - static int32_t NuwaPid() { - return sNuwaPid; - } - static bool IsNuwaReady() { return sNuwaReady; } @@ -716,7 +712,6 @@ private: #endif #ifdef MOZ_NUWA_PROCESS - static int32_t sNuwaPid; static bool sNuwaReady; #endif }; diff --git a/ipc/glue/MessageLink.cpp b/ipc/glue/MessageLink.cpp index 7414082678b..1c5ddeef672 100644 --- a/ipc/glue/MessageLink.cpp +++ b/ipc/glue/MessageLink.cpp @@ -13,7 +13,6 @@ #ifdef MOZ_NUWA_PROCESS #include "ipc/Nuwa.h" #include "mozilla/Preferences.h" -#include "mozilla/dom/ContentParent.h" #endif #include "mozilla/Assertions.h" @@ -71,9 +70,6 @@ ProcessLink::ProcessLink(MessageChannel *aChan) , mTransport(nullptr) , mIOLoop(nullptr) , mExistingListener(nullptr) -#ifdef MOZ_NUWA_PROCESS - , mIsToNuwaProcess(false) -#endif { } @@ -172,20 +168,6 @@ ProcessLink::SendMessage(Message *msg) mChan->AssertWorkerThread(); 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 GOODBYE_MESSAGE_TYPE: - break; - default: - MOZ_CRASH(); - } - } -#endif - mIOLoop->PostTask( FROM_HERE, NewRunnableMethod(mTransport, &Transport::Send, msg)); @@ -378,10 +360,6 @@ ProcessLink::OnChannelConnected(int32_t peer_pid) if (mExistingListener) mExistingListener->OnChannelConnected(peer_pid); -#ifdef MOZ_NUWA_PROCESS - mIsToNuwaProcess = (peer_pid == mozilla::dom::ContentParent::NuwaPid()); -#endif - if (notifyChannel) { mChan->OnChannelConnected(peer_pid); } diff --git a/ipc/glue/MessageLink.h b/ipc/glue/MessageLink.h index 42535c02c73..c069112f6c1 100644 --- a/ipc/glue/MessageLink.h +++ b/ipc/glue/MessageLink.h @@ -170,9 +170,6 @@ class ProcessLink Transport* mTransport; MessageLoop* mIOLoop; // thread where IO happens Transport::Listener* mExistingListener; // channel's previous listener -#ifdef MOZ_NUWA_PROCESS - bool mIsToNuwaProcess; -#endif }; class ThreadLink : public MessageLink