Bug 1457148 - fix crash in Accessible::Bounds. r=surkov
authorYura Zenevich <yura.zenevich@gmail.com>
Thu, 26 Apr 2018 12:27:31 -0400
changeset 472073 2321cd280739952a9481a1ad96008aeb3d0a0bd7
parent 472072 b2a3cbc041dd835893b261ff64caa8120468f887
child 472074 6825c9cd5bd5b98009d99384999a4de4945552ba
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1457148
milestone61.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 1457148 - fix crash in Accessible::Bounds. r=surkov MozReview-Commit-ID: 9gIzmygUcoF
accessible/windows/msaa/AccessibleWrap.cpp
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -914,16 +914,20 @@ AccessibleWrap::accLocation(
     return hr;
   }
 
   if (accessible) {
     return accessible->accLocation(pxLeft, pyTop, pcxWidth, pcyHeight,
                                    kVarChildIdSelf);
   }
 
+  if (IsDefunct()) {
+    return CO_E_OBJNOTCONNECTED;
+  }
+
   nsIntRect rect = Bounds();
 
   *pxLeft = rect.X();
   *pyTop = rect.Y();
   *pcxWidth = rect.Width();
   *pcyHeight = rect.Height();
   return S_OK;
 }