Bug 1670098 - location.replace should do a proper replace for same document navigations, r=peterv

With this change SHIP seems to also fix an issue with hashchange event - those are triggered now
more consistently than without SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D92993
This commit is contained in:
Olli Pettay
2020-10-09 19:20:07 +00:00
parent ed6ce56605
commit 8940fdea4e
4 changed files with 17 additions and 10 deletions

View File

@@ -2730,6 +2730,7 @@ void BrowsingContext::SetActiveSessionHistoryEntry(
const Maybe<nsPoint>& aPreviousScrollPos, SessionHistoryInfo* aInfo,
uint32_t aLoadType, int32_t aChildOffset, uint32_t aUpdatedCacheKey) {
if (XRE_IsContentProcess()) {
// XXX Why we update cache key only in content process case?
if (aUpdatedCacheKey != 0) {
aInfo->SetCacheKey(aUpdatedCacheKey);
}