Backed out changeset 6ad49f7d560a (bug 1756995) for causing mochitest failures on browser_firefoxview_tab.js CLOSED TREE

This commit is contained in:
Cristian Tuns
2022-05-25 14:27:30 -04:00
parent 1cfa0525cb
commit 9b5c5999f2
10 changed files with 111 additions and 199 deletions

View File

@@ -5822,8 +5822,8 @@ nsDocShell::OnStateChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
if (WindowContext* windowContext =
mBrowsingContext->GetCurrentWindowContext()) {
SessionStoreChild::From(windowContext->GetWindowGlobalChild())
->ResetSessionStore(mBrowsingContext,
mBrowsingContext->GetSessionStoreEpoch());
->SendResetSessionStore(
mBrowsingContext, mBrowsingContext->GetSessionStoreEpoch());
}
}
}
@@ -6564,14 +6564,11 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
if constexpr (SessionStoreUtils::NATIVE_LISTENER) {
if (WindowContext* windowContext =
mBrowsingContext->GetCurrentWindowContext()) {
using Change = SessionStoreChangeListener::Change;
// We've finished loading the page and now we want to collect all the
// session store state that the page is initialized with.
SessionStoreChangeListener::CollectSessionStoreData(
windowContext,
EnumSet<Change>(Change::Input, Change::Scroll, Change::SessionHistory,
Change::WireFrame));
// TODO(farre): File bug: From a user perspective this would probably be
// just fine to run off the change listener timer. Turns out that a flush
// is needed. Several tests depend on this behaviour. Could potentially be
// an optimization for later. See Bug 1756995.
SessionStoreChangeListener::FlushAllSessionStoreData(windowContext);
}
}