Bug 1535800 - Part 1: Handle a null mSessionHistory in ResumeRedirectedLoad, r=qdot
authorNika Layzell <nika@thelayzells.com>
Thu, 09 May 2019 21:07:41 +0000
changeset 532783 9b3e897d5a6ad159a1ab1e895b502fe0b2e40cbf
parent 532782 c58e444ffd0cf281ed4a708c149c834fe66fbba3
child 532784 2ed4342ee7ccfc331543bb221add2696d38583bd
push id11272
push userapavel@mozilla.com
push dateThu, 16 May 2019 15:28:22 +0000
treeherdermozilla-beta@2265bfc5920d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1535800
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1535800 - Part 1: Handle a null mSessionHistory in ResumeRedirectedLoad, r=qdot Differential Revision: https://phabricator.services.mozilla.com/D30558
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -13145,17 +13145,17 @@ nsDocShell::ResumeRedirectedLoad(uint64_
         nsresult rv = nsDocShellLoadState::CreateFromPendingChannel(
             aChannel, getter_AddRefs(loadState));
         if (NS_WARN_IF(NS_FAILED(rv))) {
           return;
         }
 
         // If we're performing a history load, locate the correct history entry,
         // and set the relevant bits on our loadState.
-        if (aHistoryIndex >= 0) {
+        if (aHistoryIndex >= 0 && self->mSessionHistory) {
           nsCOMPtr<nsISHistory> legacySHistory =
               self->mSessionHistory->LegacySHistory();
 
           nsCOMPtr<nsISHEntry> entry;
           rv = legacySHistory->GetEntryAtIndex(aHistoryIndex,
                                                getter_AddRefs(entry));
           if (NS_SUCCEEDED(rv)) {
             legacySHistory->InternalSetRequestedIndex(aHistoryIndex);