зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1342303 part 3 - Remove nsCOMArray::EnumerateForwards uses in docshell. r=smaug
MozReview-Commit-ID: FJen0p0c54u --HG-- extra : rebase_source : 8e98161531189c9cf2578eb6d81835a20d707ca1
This commit is contained in:
Родитель
9fba97cea0
Коммит
a01dc10d87
|
@ -59,19 +59,14 @@ nsSHEntry::nsSHEntry(const nsSHEntry& aOther)
|
|||
{
|
||||
}
|
||||
|
||||
static bool
|
||||
ClearParentPtr(nsISHEntry* aEntry, void* /* aData */)
|
||||
{
|
||||
if (aEntry) {
|
||||
aEntry->SetParent(nullptr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
nsSHEntry::~nsSHEntry()
|
||||
{
|
||||
// Null out the mParent pointers on all our kids.
|
||||
mChildren.EnumerateForwards(ClearParentPtr, nullptr);
|
||||
for (nsISHEntry* entry : mChildren) {
|
||||
if (entry) {
|
||||
entry->SetParent(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsSHEntry, nsISHContainer, nsISHEntry, nsISHEntryInternal)
|
||||
|
|
Загрузка…
Ссылка в новой задаче