Bug 676240 - Crash [@ nsXULTreeAccessible::GetChildCount(), r=tbsaunde
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 04 Aug 2011 12:57:22 +0900
changeset 73805 0e7f85aa8137ccc923824139ebde10a3c93d72b3
parent 73804 75c8a2eb9f87a0a2a4e039f1311de7eba87ca95d
child 73806 f0075fe638ee78c7c8507dae7cedd62cc4a7119a
push id963
push usersurkov.alexander@gmail.com
push dateThu, 04 Aug 2011 03:58:07 +0000
treeherdermozilla-inbound@f0075fe638ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs676240
milestone8.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 676240 - Crash [@ nsXULTreeAccessible::GetChildCount(), r=tbsaunde
accessible/src/msaa/nsAccessibleWrap.cpp
--- a/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -229,19 +229,26 @@ STDMETHODIMP nsAccessibleWrap::get_accPa
 
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
   return S_OK;
 }
 
 STDMETHODIMP nsAccessibleWrap::get_accChildCount( long __RPC_FAR *pcountChildren)
 {
 __try {
+  if (!pcountChildren)
+    return E_INVALIDARG;
+
   *pcountChildren = 0;
+
+  if (IsDefunct())
+    return E_FAIL;
+
   if (nsAccUtils::MustPrune(this))
-    return NS_OK;
+    return S_OK;
 
   *pcountChildren = GetChildCount();
 } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
 
   return S_OK;
 }
 
 STDMETHODIMP nsAccessibleWrap::get_accChild(