Bug 560630 - NotificationService for e10s fennec initialized and used in different threads. r=bent.mozilla. a+
authorOleg Romashin <romaxa@gmail.com>
Tue, 10 Aug 2010 13:12:21 -0700
changeset 49356 769df85cde9acd555ac1faf2811bd7790c3e8cd6
parent 49355 a72857bca7e6b022268880bc30555d1a6a8e3cca
child 49357 4084caac398faa6c3bfc44eea922998fa3acc4e9
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent.mozilla
bugs560630
milestone2.0b4pre
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 560630 - NotificationService for e10s fennec initialized and used in different threads. r=bent.mozilla. a+
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"
@@ -117,16 +118,18 @@ bool ChildProcessHost::Send(IPC::Message
   }
   return channel_->Send(msg);
 }
 
 void ChildProcessHost::Notify(NotificationType type) {
 #ifdef CHROMIUM_MOZILLA_BUILD
   MessageLoop* loop = ChromeThread::GetMessageLoop(ChromeThread::IO);
   if (!loop)
+      loop = mozilla::ipc::ProcessChild::message_loop();
+  if (!loop)
       loop = MessageLoop::current();
   loop->PostTask(
 #else
   resource_dispatcher_host_->ui_loop()->PostTask(
 #endif
       FROM_HERE, new ChildNotificationTask(type, this));
 }