Bug 1585364 - Fix IsFrame check to work in fission. r=ckerschb,nika
authorJonathan Kingston <jkt@mozilla.com>
Thu, 03 Oct 2019 16:42:25 +0000
changeset 496206 f3804bb2592c3107beaea6ad0181c83cee42f56b
parent 496205 da487c9c5d6c20e6c5f5f017d08104be0312f7c6
child 496207 19d46cc8b80fd26d928db64bc943f6062b8a5d22
push id36647
push usernerli@mozilla.com
push dateFri, 04 Oct 2019 04:09:18 +0000
treeherdermozilla-central@678d4d2c3c4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb, nika
bugs1585364
milestone71.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 1585364 - Fix IsFrame check to work in fission. r=ckerschb,nika Differential Revision: https://phabricator.services.mozilla.com/D47783
dom/base/nsFrameLoader.cpp
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -2124,22 +2124,18 @@ nsresult nsFrameLoader::MaybeCreateDocSh
                "docshell and document should have the same privateBrowsingId "
                "attribute.");
 
     attrs = oa;
   }
 
   if (OwnerIsMozBrowserFrame()) {
     docShell->SetFrameType(nsIDocShell::FRAME_TYPE_BROWSER);
-  } else {
-    nsCOMPtr<nsIDocShellTreeItem> parentCheck;
-    docShell->GetInProcessSameTypeParent(getter_AddRefs(parentCheck));
-    if (!!parentCheck) {
-      docShell->SetIsFrame();
-    }
+  } else if (mBrowsingContext->GetParent()) {
+    docShell->SetIsFrame();
   }
 
   // Apply sandbox flags even if our owner is not an iframe, as this copies
   // flags from our owning content's owning document.
   // Note: ApplySandboxFlags should be called after docShell->SetFrameType
   // because we need to get the correct presentation URL in ApplySandboxFlags.
   uint32_t sandboxFlags = 0;
   HTMLIFrameElement* iframe = HTMLIFrameElement::FromNode(mOwnerContent);