Bug 1368269 - Crash in mozilla::a11y::XULTreeAccessible::Shutdown. r=marcoz, a=jcristau
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 12 Sep 2017 10:24:00 -0400
changeset 356341 0cff5e66e0f45869503298a929af6d76992453d6
parent 356340 292ae551b2b348b941cc78c63f332a2c54d88160
child 356342 4581e944421082b56c0cde95690f3e7d8c69f3a0
push id7309
push userryanvm@gmail.com
push dateSat, 16 Sep 2017 21:16:45 +0000
treeherdermozilla-esr52@4581e9444210 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz, jcristau
bugs1368269
milestone52.4.0
Bug 1368269 - Crash in mozilla::a11y::XULTreeAccessible::Shutdown. r=marcoz, a=jcristau
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()