зеркало из https://github.com/mozilla/gecko-dev.git
Bug 185236 part 2. Make sure to remove our SheetLoadData from mPostedEvents before calling SheetComplete on it, so that checking for pending loads from inside SheetComplete will work correctly. r=peterv
This commit is contained in:
Родитель
af9fbb68d4
Коммит
3752e6e036
|
@ -2178,6 +2178,12 @@ Loader::HandleLoadEvent(SheetLoadData* aEvent)
|
|||
// we're unblocking the parser
|
||||
// NS_ASSERTION(aEvent->mObserver, "Must have observer");
|
||||
NS_ASSERTION(aEvent->mSheet, "Must have sheet");
|
||||
|
||||
// Very important: this needs to come before the SheetComplete call
|
||||
// below, so that HasPendingLoads() will test true as needed under
|
||||
// notifications we send from that SheetComplete call.
|
||||
mPostedEvents.RemoveElement(aEvent);
|
||||
|
||||
if (!aEvent->mIsCancelled) {
|
||||
// SheetComplete will call Release(), so give it a reference to do
|
||||
// that with.
|
||||
|
@ -2185,8 +2191,6 @@ Loader::HandleLoadEvent(SheetLoadData* aEvent)
|
|||
SheetComplete(aEvent, NS_OK);
|
||||
}
|
||||
|
||||
mPostedEvents.RemoveElement(aEvent);
|
||||
|
||||
if (mDocument) {
|
||||
mDocument->UnblockOnload(PR_TRUE);
|
||||
}
|
||||
|
|
|
@ -472,6 +472,7 @@ private:
|
|||
LoadDataArray mPostedEvents;
|
||||
|
||||
// Our array of "global" observers
|
||||
// XXXbz these are strong refs; should we be cycle collecting CSS loaders?
|
||||
nsTObserverArray<nsCOMPtr<nsICSSLoaderObserver> > mObservers;
|
||||
|
||||
// the load data needs access to the document...
|
||||
|
|
Загрузка…
Ссылка в новой задаче