Bug 1496839 - Avoid dereferencing null frame r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Thu, 18 Oct 2018 02:26:59 +0000
changeset 497669 8a1bcc91affb90fbdb0f36d5c45d0629e4b43622
parent 497668 3a18b352f6fb76d157dd54ea1cb8e1ba6c35d97f
child 497670 c645265aa5b827fac52c3692991cbd55558d5821
push id10002
push userarchaeopteryx@coole-files.de
push dateFri, 19 Oct 2018 23:09:29 +0000
treeherdermozilla-beta@01378c910610 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1496839
milestone64.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 1496839 - Avoid dereferencing null frame r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D8882
layout/ipc/RenderFrameParent.cpp
--- a/layout/ipc/RenderFrameParent.cpp
+++ b/layout/ipc/RenderFrameParent.cpp
@@ -434,10 +434,12 @@ nsDisplayRemote::GetRemoteLayersId() con
 {
   MOZ_ASSERT(GetRenderFrameParent());
   return GetRenderFrameParent()->GetLayersId();
 }
 
 mozilla::layout::RenderFrameParent*
 nsDisplayRemote::GetRenderFrameParent() const
 {
-  return static_cast<nsSubDocumentFrame*>(Frame())->GetRenderFrameParent();
+  return mFrame
+    ? static_cast<nsSubDocumentFrame*>(mFrame)->GetRenderFrameParent()
+    : nullptr;
 }