Bug 1540839 - Don't set embedder element to null; r=nika
☠☠ backed out by 0d1fd6730856 ☠ ☠
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 08 May 2019 14:32:55 -0700
changeset 532526 b71b58e40426eb7847f1461ca390422b10a88fed
parent 532525 484a546133586d3b1a10b77fb5043df8e4127827
child 532527 55e841a0f005be12b407ed25afaaf3e84e01bb09
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1540839
milestone68.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 1540839 - Don't set embedder element to null; r=nika When resetting the BrowsingContext embedder element, only do so if the FrameElement we're setting isn't already null. Differential Revision: https://phabricator.services.mozilla.com/D30562
dom/ipc/BrowserParent.cpp
--- a/dom/ipc/BrowserParent.cpp
+++ b/dom/ipc/BrowserParent.cpp
@@ -531,17 +531,17 @@ void BrowserParent::SetOwnerElement(Elem
   }
 
   if (mRenderFrame.IsInitialized()) {
     mRenderFrame.OwnerContentChanged();
   }
 
   // Set our BrowsingContext's embedder if we're not embedded within a
   // BrowserBridgeParent.
-  if (!GetBrowserBridgeParent() && mBrowsingContext) {
+  if (!GetBrowserBridgeParent() && mBrowsingContext && mFrameElement) {
     mBrowsingContext->SetEmbedderElement(mFrameElement);
   }
 
   VisitChildren([aElement](BrowserBridgeParent* aBrowser) {
     aBrowser->GetBrowserParent()->SetOwnerElement(aElement);
   });
 }