Bug 706026 - Crash in nsXULTextFieldAccessible::FrameSelection, r=marcoz a=asa
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 15 Dec 2011 11:17:01 -0500
changeset 80781 ad9c59f772eec146d854fac78172426db5da6213
parent 80780 68deda0f65079178388cc3d950829a31bd1a87f4
child 80782 4ad3e1f143ccccda451e7462b42139a4bb9426e2
push id611
push userdbolter@mozilla.com
push dateThu, 15 Dec 2011 16:25:49 +0000
treeherdermozilla-aurora@ad9c59f772ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarcoz, asa
bugs706026
milestone10.0a2
Bug 706026 - Crash in nsXULTextFieldAccessible::FrameSelection, r=marcoz a=asa (aurora landing)
accessible/src/msaa/CAccessibleText.cpp
--- a/accessible/src/msaa/CAccessibleText.cpp
+++ b/accessible/src/msaa/CAccessibleText.cpp
@@ -171,16 +171,18 @@ CAccessibleText::get_characterExtents(lo
 
 STDMETHODIMP
 CAccessibleText::get_nSelections(long *aNSelections)
 {
 __try {
   *aNSelections = 0;
 
   nsRefPtr<nsHyperTextAccessible> textAcc(do_QueryObject(this));
+  if (textAcc->IsDefunct())
+    return E_FAIL;
 
   PRInt32 selCount = 0;
   nsresult rv = textAcc->GetSelectionCount(&selCount);
   if (NS_FAILED(rv))
     return GetHRESULT(rv);
 
   *aNSelections = selCount;
   return S_OK;