зеркало из https://github.com/mozilla/gecko-dev.git
Bug 772076 - Fix race condition whereby BrowserElementParent.js can be loaded /after/ BrowserElementChild.js, for popup windows in <iframe mozbrowser>. r=smaug
--HG-- extra : rebase_source : 725a604814379760736cba5a020cf10de57e895f
This commit is contained in:
Родитель
b32b8d13ce
Коммит
298f387e4e
|
@ -296,6 +296,7 @@ nsFrameLoader::nsFrameLoader(Element* aOwner, bool aNetworkCreated)
|
|||
, mRemoteFrame(false)
|
||||
, mClipSubdocument(true)
|
||||
, mClampScrollPosition(true)
|
||||
, mRemoteBrowserInitialized(false)
|
||||
, mCurrentRemoteFrame(nsnull)
|
||||
, mRemoteBrowser(nsnull)
|
||||
, mRenderMode(RENDER_MODE_DEFAULT)
|
||||
|
@ -913,9 +914,10 @@ nsFrameLoader::ShowRemoteFrame(const nsIntSize& size)
|
|||
EnsureMessageManager();
|
||||
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (OwnerIsBrowserFrame() && os) {
|
||||
if (OwnerIsBrowserFrame() && os && !mRemoteBrowserInitialized) {
|
||||
os->NotifyObservers(NS_ISUPPORTS_CAST(nsIFrameLoader*, this),
|
||||
"remote-browser-frame-shown", NULL);
|
||||
mRemoteBrowserInitialized = true;
|
||||
}
|
||||
} else {
|
||||
nsRect dimensions;
|
||||
|
@ -2241,4 +2243,12 @@ nsFrameLoader::SetRemoteBrowser(nsITabParent* aTabParent)
|
|||
MOZ_ASSERT(!mRemoteBrowser);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -330,6 +330,7 @@ private:
|
|||
bool mRemoteFrame : 1;
|
||||
bool mClipSubdocument : 1;
|
||||
bool mClampScrollPosition : 1;
|
||||
bool mRemoteBrowserInitialized : 1;
|
||||
|
||||
// XXX leaking
|
||||
nsCOMPtr<nsIObserver> mChildHost;
|
||||
|
|
Загрузка…
Ссылка в новой задаче