зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187151 (part 8) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey.
--HG-- extra : rebase_source : 31414e1748ab39d9d904b3e68f47d30b6f608a7c
This commit is contained in:
Родитель
893eeadcd4
Коммит
67e8eac303
|
@ -2677,20 +2677,6 @@ XULDocument::LoadOverlayInternal(nsIURI* aURI, bool aIsDynamic,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
static PLDHashOperator
|
||||
FirePendingMergeNotification(nsIURI* aKey, nsCOMPtr<nsIObserver>& aObserver, void* aClosure)
|
||||
{
|
||||
aObserver->Observe(aKey, "xul-overlay-merged", EmptyString().get());
|
||||
|
||||
typedef nsInterfaceHashtable<nsURIHashKey,nsIObserver> table;
|
||||
table* observers = static_cast<table*>(aClosure);
|
||||
if (observers) {
|
||||
observers->Remove(aKey);
|
||||
}
|
||||
|
||||
return PL_DHASH_REMOVE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
XULDocument::ResumeWalk()
|
||||
{
|
||||
|
@ -3041,9 +3027,23 @@ XULDocument::DoneWalking()
|
|||
|
||||
// Walk the set of pending load notifications and notify any observers.
|
||||
// See below for detail.
|
||||
if (mPendingOverlayLoadNotifications)
|
||||
mPendingOverlayLoadNotifications->Enumerate(
|
||||
FirePendingMergeNotification, mOverlayLoadObservers.get());
|
||||
if (mPendingOverlayLoadNotifications) {
|
||||
nsInterfaceHashtable<nsURIHashKey,nsIObserver>* observers =
|
||||
mOverlayLoadObservers.get();
|
||||
for (auto iter = mPendingOverlayLoadNotifications->Iter();
|
||||
!iter.Done();
|
||||
iter.Next()) {
|
||||
nsIURI* aKey = iter.Key();
|
||||
iter.Data()->Observe(aKey, "xul-overlay-merged",
|
||||
EmptyString().get());
|
||||
|
||||
if (observers) {
|
||||
observers->Remove(aKey);
|
||||
}
|
||||
|
||||
iter.Remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mOverlayLoadObservers) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче