Bug 560630 - NotificationService for e10s fennec initialized and used in different threads. r=bent.mozilla. a+

This commit is contained in:
Oleg Romashin 2010-08-10 13:12:21 -07:00
parent 281be8f483
commit 67bde60497

View File

@ -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(