Bug 1003100 - pushState() in iframe fails when reloading with CTRL+F5, r=bz

This commit is contained in:
Olli Pettay
2015-10-16 20:05:54 +03:00
parent fa83b610b2
commit dbb8d7e043
4 changed files with 40 additions and 6 deletions

View File

@@ -11121,8 +11121,11 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
aLoadType == LOAD_ERROR_PAGE ||
aLoadType & LOAD_CMD_HISTORY);
// We don't update session history on reload.
bool updateSHistory = updateGHistory && (!(aLoadType & LOAD_CMD_RELOAD));
// We don't update session history on reload unless we're loading
// an iframe in shift-reload case.
bool updateSHistory = updateGHistory &&
(!(aLoadType & LOAD_CMD_RELOAD) ||
(IsForceReloadType(aLoadType) && IsFrame()));
// Create SH Entry (mLSHE) only if there is a SessionHistory object in the
// current frame or in the root docshell.
@@ -11195,9 +11198,9 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
* see bug 90098
*/
if (aChannel && IsForceReloadType(aLoadType)) {
NS_ASSERTION(!updateSHistory,
"We shouldn't be updating session history for forced"
" reloads!");
MOZ_ASSERT(!updateSHistory || IsFrame(),
"We shouldn't be updating session history for forced"
" reloads unless we're in a newly created iframe!");
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(aChannel));
nsCOMPtr<nsISupports> cacheKey;