Bug 1670848: Handling aborting history navigations when others run r=smaug
Handles edge cases around history.go() with one event loop spin Differential Revision: https://phabricator.services.mozilla.com/D93302
This commit is contained in:
@@ -11090,7 +11090,17 @@ nsresult nsDocShell::UpdateURLAndHistory(Document* aDocument, nsIURI* aNewURI,
|
||||
// Step 2.
|
||||
|
||||
// Step 2.2, "Remove any tasks queued by the history traversal task
|
||||
// source..."
|
||||
// source that are associated with any Document objects in the
|
||||
// top-level browsing context's document family." This is very hard in
|
||||
// SessionHistoryInParent since we can't synchronously access the
|
||||
// pending navigations that are already sent to the parent. We can
|
||||
// abort any AsyncGo navigations that are waiting to be sent. If we
|
||||
// send a message to the parent, it would be processed after any
|
||||
// navigations previously sent. So long as we consider the "history
|
||||
// traversal task source" to be the list in this process we match the
|
||||
// spec. If we move the entire list to the parent, we can handle the
|
||||
// aborting of loads there, but we don't have a way to synchronously
|
||||
// remove entries as we do here for non-SHIP.
|
||||
RefPtr<ChildSHistory> shistory = GetRootSessionHistory();
|
||||
if (shistory) {
|
||||
shistory->RemovePendingHistoryNavigations();
|
||||
|
||||
Reference in New Issue
Block a user