forked from mirrors/gecko-dev
Bug 1875040 - Use GetExtantDocument instead of GetDocument. r=smaug
Avoids accidentally creating a document when checking if a document's presentation can be saved. Differential Revision: https://phabricator.services.mozilla.com/D198781
This commit is contained in:
parent
cd3ae60da5
commit
b51bf27f13
1 changed files with 1 additions and 1 deletions
|
|
@ -9436,7 +9436,7 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
|
|||
// separate check for SHIP so that we know if there are ongoing requests
|
||||
// before calling Stop() below.
|
||||
if (mozilla::SessionHistoryInParent()) {
|
||||
Document* document = GetDocument();
|
||||
Document* document = GetExtantDocument();
|
||||
uint32_t flags = 0;
|
||||
if (document && !document->CanSavePresentation(nullptr, flags, true)) {
|
||||
// This forces some flags into the WindowGlobalParent's mBFCacheStatus,
|
||||
|
|
|
|||
Loading…
Reference in a new issue