зеркало из https://github.com/mozilla/gecko-dev.git
Bug 553904 - Child tab process crashes on attempt to initialize child plugin process. r=bent.mozilla
This commit is contained in:
Родитель
90532af1b7
Коммит
e9043320a2
|
@ -79,8 +79,7 @@ void
|
|||
PluginProcessParent::Delete()
|
||||
{
|
||||
MessageLoop* currentLoop = MessageLoop::current();
|
||||
MessageLoop* ioLoop =
|
||||
BrowserProcessSubThread::GetMessageLoop(BrowserProcessSubThread::IO);
|
||||
MessageLoop* ioLoop = XRE_GetIOMessageLoop();
|
||||
|
||||
if (currentLoop == ioLoop) {
|
||||
delete this;
|
||||
|
|
|
@ -120,7 +120,10 @@ bool ChildProcessHost::Send(IPC::Message* msg) {
|
|||
|
||||
void ChildProcessHost::Notify(NotificationType type) {
|
||||
#ifdef CHROMIUM_MOZILLA_BUILD
|
||||
ChromeThread::GetMessageLoop(ChromeThread::IO)->PostTask(
|
||||
MessageLoop* loop = ChromeThread::GetMessageLoop(ChromeThread::IO);
|
||||
if (!loop)
|
||||
loop = MessageLoop::current();
|
||||
loop->PostTask(
|
||||
#else
|
||||
resource_dispatcher_host_->ui_loop()->PostTask(
|
||||
#endif
|
||||
|
|
|
@ -121,8 +121,7 @@ AsyncChannel::Open(Transport* aTransport, MessageLoop* aIOLoop)
|
|||
if(!aIOLoop) {
|
||||
// parent
|
||||
needOpen = false;
|
||||
aIOLoop = BrowserProcessSubThread
|
||||
::GetMessageLoop(BrowserProcessSubThread::IO);
|
||||
aIOLoop = XRE_GetIOMessageLoop();
|
||||
// FIXME assuming that the parent waits for the OnConnected event.
|
||||
// FIXME see GeckoChildProcessHost.cpp. bad assumption!
|
||||
mChannelState = ChannelConnected;
|
||||
|
|
|
@ -78,8 +78,7 @@ GeckoChildProcessHost::GeckoChildProcessHost(GeckoProcessType aProcessType,
|
|||
{
|
||||
MOZ_COUNT_CTOR(GeckoChildProcessHost);
|
||||
|
||||
MessageLoop* ioLoop =
|
||||
BrowserProcessSubThread::GetMessageLoop(BrowserProcessSubThread::IO);
|
||||
MessageLoop* ioLoop = XRE_GetIOMessageLoop();
|
||||
ioLoop->PostTask(FROM_HERE,
|
||||
NewRunnableMethod(this,
|
||||
&GeckoChildProcessHost::InitializeChannel));
|
||||
|
@ -103,8 +102,7 @@ GeckoChildProcessHost::~GeckoChildProcessHost()
|
|||
bool
|
||||
GeckoChildProcessHost::SyncLaunch(std::vector<std::string> aExtraOpts)
|
||||
{
|
||||
MessageLoop* ioLoop =
|
||||
BrowserProcessSubThread::GetMessageLoop(BrowserProcessSubThread::IO);
|
||||
MessageLoop* ioLoop = XRE_GetIOMessageLoop();
|
||||
NS_ASSERTION(MessageLoop::current() != ioLoop, "sync launch from the IO thread NYI");
|
||||
|
||||
ioLoop->PostTask(FROM_HERE,
|
||||
|
@ -125,8 +123,7 @@ GeckoChildProcessHost::SyncLaunch(std::vector<std::string> aExtraOpts)
|
|||
bool
|
||||
GeckoChildProcessHost::AsyncLaunch(std::vector<std::string> aExtraOpts)
|
||||
{
|
||||
MessageLoop* ioLoop =
|
||||
BrowserProcessSubThread::GetMessageLoop(BrowserProcessSubThread::IO);
|
||||
MessageLoop* ioLoop = XRE_GetIOMessageLoop();
|
||||
ioLoop->PostTask(FROM_HERE,
|
||||
NewRunnableMethod(this,
|
||||
&GeckoChildProcessHost::PerformAsyncLaunch,
|
||||
|
|
|
@ -65,6 +65,7 @@ MozillaChildThread::Init()
|
|||
// Silverlight depends on the host calling CoInitialize.
|
||||
::CoInitialize(NULL);
|
||||
#endif
|
||||
// Add notification service here once bug 560630 is fixed
|
||||
|
||||
// Certain plugins, such as flash, steal the unhandled exception filter
|
||||
// thus we never get crash reports when they fault. This call fixes it.
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
#include "base/message_loop.h"
|
||||
#include "base/process_util.h"
|
||||
#include "chrome/common/child_process.h"
|
||||
#include "chrome/common/notification_service.h"
|
||||
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/ipc/BrowserProcessSubThread.h"
|
||||
|
@ -338,6 +339,7 @@ XRE_InitChildProcess(int aArgc,
|
|||
NS_ABORT_IF_FALSE(ok, "can't open handle to parent");
|
||||
|
||||
base::AtExitManager exitManager;
|
||||
NotificationService notificationService;
|
||||
|
||||
NS_LogInit();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче