Bug 1368269 - Crash in mozilla::a11y::XULTreeAccessible::Shutdown, r=marcoz
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 12 Sep 2017 10:24:00 -0400
changeset 429795 09df59c389f58591b6bab860c3fa4a0183bf871e
parent 429794 0cbbb59b5e61c5e1af0d42df72f56a9b736a454b
child 429796 4498739037187b553b5428ad65b7c38238e6298f
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz
bugs1368269
milestone57.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 1368269 - Crash in mozilla::a11y::XULTreeAccessible::Shutdown, r=marcoz
accessible/xul/XULTreeAccessible.cpp
accessible/xul/XULTreeGridAccessible.cpp
--- a/accessible/xul/XULTreeAccessible.cpp
+++ b/accessible/xul/XULTreeAccessible.cpp
@@ -139,17 +139,17 @@ XULTreeAccessible::Value(nsString& aValu
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeAccessible: Accessible implementation
 
 void
 XULTreeAccessible::Shutdown()
 {
-  if (!mDoc->IsDefunct()) {
+  if (mDoc && !mDoc->IsDefunct()) {
     UnbindCacheEntriesFromDocument(mAccessibleCache);
   }
 
   mTree = nullptr;
   mTreeView = nullptr;
 
   AccessibleWrap::Shutdown();
 }
--- a/accessible/xul/XULTreeGridAccessible.cpp
+++ b/accessible/xul/XULTreeGridAccessible.cpp
@@ -272,17 +272,17 @@ NS_IMPL_RELEASE_INHERITED(XULTreeGridRow
                           XULTreeItemAccessibleBase)
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeGridRowAccessible: Accessible implementation
 
 void
 XULTreeGridRowAccessible::Shutdown()
 {
-  if (!mDoc->IsDefunct()) {
+  if (mDoc && !mDoc->IsDefunct()) {
     UnbindCacheEntriesFromDocument(mAccessibleCache);
   }
 
   XULTreeItemAccessibleBase::Shutdown();
 }
 
 role
 XULTreeGridRowAccessible::NativeRole()