bug 1186536 - Bail out of ProxyTextChangeEvent() if the proxy doesn't have a wrapper r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Tue, 08 Sep 2015 17:08:16 -0400
changeset 261598 2cef846e92e44191b14235f6b02543c47ae2a61a
parent 261597 f2857622eb8729e901d71167146db012c887dfc3
child 261599 9dc18f7a238f8636c0a08ac1faff3e07e869f543
push id64776
push usertrev.saunders@gmail.com
push dateWed, 09 Sep 2015 21:36:15 +0000
treeherdermozilla-inbound@2cef846e92e4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1186536
milestone43.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 1186536 - Bail out of ProxyTextChangeEvent() if the proxy doesn't have a wrapper r=davidb This probably should never happen, but it seems to sometimes in the wild, and its hard to know what caused that without a test case. So for now work around the issue by adding a null check.
accessible/windows/msaa/Platform.cpp
--- a/accessible/windows/msaa/Platform.cpp
+++ b/accessible/windows/msaa/Platform.cpp
@@ -71,13 +71,18 @@ a11y::ProxyCaretMoveEvent(ProxyAccessibl
 {
 }
 
 void
 a11y::ProxyTextChangeEvent(ProxyAccessible* aText, const nsString& aStr,
                            int32_t aStart, uint32_t aLen, bool aInsert, bool)
 {
   AccessibleWrap* wrapper = WrapperFor(aText);
+  MOZ_ASSERT(wrapper);
+  if (!wrapper) {
+    return;
+  }
+
   auto text = static_cast<HyperTextAccessibleWrap*>(wrapper->AsHyperText());
   if (text) {
     ia2AccessibleText::UpdateTextChangeData(text, aInsert, aStr, aStart, aLen);
   }
 }