Commit d3532559 authored by Olli Pettay's avatar Olli Pettay
Browse files

Bug 1717765, tweak the check when creating a new content viewer shouldn't succeed, r=peterv

parent bd99df65
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -6474,7 +6474,8 @@ nsresult nsDocShell::CreateAboutBlankContentViewer(
    return NS_ERROR_FAILURE;
  }

  if (!mBrowsingContext->AncestorsAreCurrent()) {
  if (!mBrowsingContext->AncestorsAreCurrent() ||
      mBrowsingContext->IsInBFCache()) {
    mBrowsingContext->RemoveRootFromBFCacheSync();
    return NS_ERROR_NOT_AVAILABLE;
  }
@@ -7628,7 +7629,8 @@ nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
    return NS_ERROR_DOCSHELL_DYING;
  }

  if (!mBrowsingContext->AncestorsAreCurrent()) {
  if (!mBrowsingContext->AncestorsAreCurrent() ||
      mBrowsingContext->IsInBFCache()) {
    mBrowsingContext->RemoveRootFromBFCacheSync();
    return NS_ERROR_NOT_AVAILABLE;
  }