Bug 1368269 - Crash in mozilla::a11y::XULTreeAccessible::Shutdown. r=marcoz, a=lizzard
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 12 Sep 2017 10:24:00 -0400
changeset 421713 d0a01370e594f7f793d5dc4d2589b7a24f9b8ca4
parent 421712 acd7c5826e6ac0f3a323d3b35034b13538ecdc4b
child 421714 5c43034960096da09592861b4ad7d2ddb344d8e1
push id7754
push userryanvm@gmail.com
push dateWed, 13 Sep 2017 22:07:59 +0000
treeherdermozilla-beta@b0f08e34f67d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz, lizzard
bugs1368269
milestone56.0
Bug 1368269 - Crash in mozilla::a11y::XULTreeAccessible::Shutdown. r=marcoz, a=lizzard
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()