mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
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
@ -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 New Issue
Block a user