From afe1f4eb6f9bc403ddcf5e1c5bd6fd6ca2f11726 Mon Sep 17 00:00:00 2001 From: Oleg Romashin Date: Tue, 10 Aug 2010 13:12:21 -0700 Subject: [PATCH] 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipc/chromium/src/chrome/common/child_process_host.cc b/ipc/chromium/src/chrome/common/child_process_host.cc index 6c3b2eb9cf0b..d52074bdfc7d 100644 --- a/ipc/chromium/src/chrome/common/child_process_host.cc +++ b/ipc/chromium/src/chrome/common/child_process_host.cc @@ -11,6 +11,7 @@ #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 @@ -121,6 +122,8 @@ bool ChildProcessHost::Send(IPC::Message* 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(