Bug 444222 - Add a flag 'SetHasLoadedNonInitialDocument' in the BrowsingContext. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D88416
This commit is contained in:
Tim Huang
2020-09-11 07:52:11 +00:00
parent 95d58b3e4b
commit 7cdafb631c
2 changed files with 6 additions and 1 deletions

View File

@@ -7772,6 +7772,10 @@ nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
NS_ENSURE_SUCCESS(Embed(viewer), NS_ERROR_FAILURE);
if (!mBrowsingContext->GetHasLoadedNonInitialDocument()) {
MOZ_ALWAYS_SUCCEEDS(mBrowsingContext->SetHasLoadedNonInitialDocument(true));
}
if (TreatAsBackgroundLoad()) {
nsCOMPtr<nsIRunnable> triggerParentCheckDocShell =
NewRunnableMethod("nsDocShell::TriggerParentCheckDocShellIsEmpty", this,