зеркало из https://github.com/mozilla/pjs.git
Fire dynamic overlay load observers in more cases b=419452 r+sr=jst a=beltzner
This commit is contained in:
Родитель
587498a020
Коммит
26bd04c613
|
@ -2995,6 +2995,7 @@ nsXULDocument::ResumeWalk()
|
||||||
if (! count)
|
if (! count)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
nsCOMPtr<nsIURI> overlayURI = mCurrentPrototype->GetURI();
|
||||||
nsCOMPtr<nsIURI> uri = mUnloadedOverlays[count-1];
|
nsCOMPtr<nsIURI> uri = mUnloadedOverlays[count-1];
|
||||||
mUnloadedOverlays.RemoveObjectAt(count-1);
|
mUnloadedOverlays.RemoveObjectAt(count-1);
|
||||||
|
|
||||||
|
@ -3008,8 +3009,21 @@ nsXULDocument::ResumeWalk()
|
||||||
continue;
|
continue;
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
if (shouldReturn)
|
if (shouldReturn) {
|
||||||
|
if (mOverlayLoadObservers.IsInitialized()) {
|
||||||
|
nsIObserver *obs = mOverlayLoadObservers.GetWeak(overlayURI);
|
||||||
|
if (obs) {
|
||||||
|
// This overlay has an unloaded overlay, so it will never
|
||||||
|
// notify. The best we can do is to notify for the unloaded
|
||||||
|
// overlay instead, assuming nobody is already notifiable
|
||||||
|
// for it. Note that this will confuse the observer.
|
||||||
|
if (!mOverlayLoadObservers.GetWeak(uri))
|
||||||
|
mOverlayLoadObservers.Put(uri, obs);
|
||||||
|
mOverlayLoadObservers.Remove(overlayURI);
|
||||||
|
}
|
||||||
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we get here, there is nothing left for us to walk. The content
|
// If we get here, there is nothing left for us to walk. The content
|
||||||
|
|
Загрузка…
Ссылка в новой задаче