mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 13:40:17 -10:00
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:
1 parent
d635b3b4ba
commit
1356944aec
2 files changed
+7
-2
No files matched your search
@@ -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...
|
||||
|
||||
Reference in new issue
Block a user