зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1663977 - Null out the parent pointer of SessionHistoryEntry objects if their parent dies. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89629
This commit is contained in:
Родитель
bce06045ad
Коммит
3038ffdea7
|
@ -322,6 +322,13 @@ SessionHistoryEntry::SessionHistoryEntry(const SessionHistoryEntry& aEntry)
|
|||
mID(aEntry.mID) {}
|
||||
|
||||
SessionHistoryEntry::~SessionHistoryEntry() {
|
||||
// Null out the mParent pointers on all our kids.
|
||||
for (nsISHEntry* entry : mChildren) {
|
||||
if (entry) {
|
||||
entry->SetParent(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (sLoadIdToEntry) {
|
||||
sLoadIdToEntry->RemoveIf(
|
||||
[this](auto& aIter) { return aIter.Data() == this; });
|
||||
|
|
Загрузка…
Ссылка в новой задаче