Bug 560630 - NotificationService for e10s fennec initialized and used in different threads. r=bent.mozilla
authorOleg Romashin <romaxa@gmail.com>
Wed, 02 Jun 2010 05:25:46 -0400
changeset 43007 704e77dcb30342030c73fffc3955bc1656d227ba
parent 43006 954976d8dd3b2c787a3e8614b2a8807b3b511c93
child 43008 b412ab506b1e76c93ce18cac4f983080f906b9dc
push idunknown
push userunknown
push dateunknown
reviewersbent.mozilla
bugs560630
milestone1.9.3a5pre
Bug 560630 - NotificationService for e10s fennec initialized and used in different threads. r=bent.mozilla
ipc/chromium/src/chrome/common/child_process_host.cc
--- a/ipc/chromium/src/chrome/common/child_process_host.cc
+++ b/ipc/chromium/src/chrome/common/child_process_host.cc
@@ -6,16 +6,17 @@
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/message_loop.h"
 #include "base/process_util.h"
 #include "base/singleton.h"
 #include "base/waitable_event.h"
 #ifdef CHROMIUM_MOZILLA_BUILD
+#include "mozilla/ipc/ProcessChild.h"
 #include "mozilla/ipc/BrowserProcessSubThread.h"
 typedef mozilla::ipc::BrowserProcessSubThread ChromeThread;
 #else
 #include "chrome/browser/chrome_thread.h"
 #endif
 #include "chrome/common/ipc_logging.h"
 #include "chrome/common/notification_service.h"
 #include "chrome/common/notification_type.h"
@@ -115,19 +116,17 @@ bool ChildProcessHost::Send(IPC::Message
     delete msg;
     return false;
   }
   return channel_->Send(msg);
 }
 
 void ChildProcessHost::Notify(NotificationType type) {
 #ifdef CHROMIUM_MOZILLA_BUILD
-  MessageLoop* loop = ChromeThread::GetMessageLoop(ChromeThread::IO);
-  if (!loop)
-      loop = MessageLoop::current();
+  MessageLoop* loop = mozilla::ipc::ProcessChild::message_loop();
   loop->PostTask(
 #else
   resource_dispatcher_host_->ui_loop()->PostTask(
 #endif
       FROM_HERE, new ChildNotificationTask(type, this));
 }
 
 void ChildProcessHost::OnWaitableEventSignaled(base::WaitableEvent *event) {