mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 831095: Remove LOOP_OVER_OBSERVERS. r=bz
This commit is contained in:
parent
e97ded2b9d
commit
362cd90ede
@ -109,19 +109,6 @@ nsImageLoadingContent::~nsImageLoadingContent()
|
|||||||
"Observers still registered?");
|
"Observers still registered?");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Macro to call some func on each observer. This handles observers
|
|
||||||
// removing themselves.
|
|
||||||
#define LOOP_OVER_OBSERVERS(func_) \
|
|
||||||
PR_BEGIN_MACRO \
|
|
||||||
for (ImageObserver* observer = &mObserverList, *next; observer; \
|
|
||||||
observer = next) { \
|
|
||||||
next = observer->mNext; \
|
|
||||||
if (observer->mObserver) { \
|
|
||||||
observer->mObserver->func_; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
PR_END_MACRO
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* imgINotificationObserver impl
|
* imgINotificationObserver impl
|
||||||
*/
|
*/
|
||||||
@ -142,7 +129,17 @@ nsImageLoadingContent::Notify(imgIRequest* aRequest,
|
|||||||
"Unknown request");
|
"Unknown request");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOOP_OVER_OBSERVERS(Notify(aRequest, aType, aData));
|
{
|
||||||
|
nsAutoScriptBlocker scriptBlocker;
|
||||||
|
|
||||||
|
for (ImageObserver* observer = &mObserverList, *next; observer;
|
||||||
|
observer = next) {
|
||||||
|
next = observer->mNext;
|
||||||
|
if (observer->mObserver) {
|
||||||
|
observer->mObserver->Notify(aRequest, aType, aData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (aType == imgINotificationObserver::SIZE_AVAILABLE) {
|
if (aType == imgINotificationObserver::SIZE_AVAILABLE) {
|
||||||
// Have to check for state changes here, since we might have been in
|
// Have to check for state changes here, since we might have been in
|
||||||
|
Loading…
Reference in New Issue
Block a user