Bug 780761 - Fix race condition in initialization of message manager for popups from <iframe mozbrowser>. r=smaug

Calling show() causes EnsureMessageManager() to SetCallbackData() on the message manager.  If we don't do this, then the message manager will throw when we try to send a message.
This commit is contained in:
Justin Lebar 2012-08-13 15:19:09 -04:00
Родитель df138e7a01
Коммит 8a0eba3d89
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -2374,12 +2374,6 @@ nsFrameLoader::SetRemoteBrowser(nsITabParent* aTabParent)
MOZ_ASSERT(!mCurrentRemoteFrame);
mRemoteBrowser = static_cast<TabParent*>(aTabParent);
EnsureMessageManager();
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
if (OwnerIsBrowserFrame() && os) {
mRemoteBrowserInitialized = true;
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
"remote-browser-frame-shown", NULL);
}
ShowRemoteFrame(nsIntSize(0, 0));
}