зеркало из https://github.com/mozilla/pjs.git
Bug 333109 r=darin. Try to fix crash in OnItemRemoved. This is a workaround
for bug 333016 that prevents attaching multiple observers. Original committer: brettw%gmail.com Original revision: 1.67 Original date: 2006/04/10 17:24:14
This commit is contained in:
Родитель
839e124b99
Коммит
721de4f691
|
@ -3269,6 +3269,10 @@ nsNavHistoryResult::AddEverythingObserver(nsNavHistoryQueryResultNode* aNode)
|
|||
history->AddObserver(this, PR_TRUE);
|
||||
mIsHistoryObserver = PR_TRUE;
|
||||
}
|
||||
if (mEverythingObservers.IndexOf(aNode) != mEverythingObservers.NoIndex) {
|
||||
NS_NOTREACHED("Attempting to register an observer twice!");
|
||||
return;
|
||||
}
|
||||
mEverythingObservers.AppendElement(aNode);
|
||||
}
|
||||
|
||||
|
@ -3291,6 +3295,10 @@ nsNavHistoryResult::AddBookmarkObserver(nsNavHistoryFolderResultNode* aNode,
|
|||
mIsBookmarksObserver = PR_TRUE;
|
||||
}
|
||||
FolderObserverList* list = BookmarkObserversForId(aFolder, PR_TRUE);
|
||||
if (list->IndexOf(aNode) != list->NoIndex) {
|
||||
NS_NOTREACHED("Attempting to register an observer twice!");
|
||||
return;
|
||||
}
|
||||
list->AppendElement(aNode);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче