зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1667035 - Crash in [@ mozilla::dom::CanonicalBrowsingContext::RemoveDynEntriesFromActiveSessionHistoryEntry], r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D91632
This commit is contained in:
Родитель
e003e4d581
Коммит
518fc9cb15
|
@ -623,6 +623,9 @@ void CanonicalBrowsingContext::ReplaceActiveSessionHistoryEntry(
|
|||
|
||||
void CanonicalBrowsingContext::RemoveDynEntriesFromActiveSessionHistoryEntry() {
|
||||
nsISHistory* shistory = GetSessionHistory();
|
||||
// In theory shistory can be null here if the method is called right after
|
||||
// CanonicalBrowsingContext::ReplacedBy call.
|
||||
NS_ENSURE_TRUE_VOID(shistory);
|
||||
nsCOMPtr<nsISHEntry> root = nsSHistory::GetRootSHEntry(mActiveEntry);
|
||||
shistory->RemoveDynEntries(shistory->GetIndexOfEntry(root), mActiveEntry);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче