bug 1187055 - check the proxy being destroyed has a wrapper before cleaning it up r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Mon, 27 Jul 2015 17:52:03 -0400
changeset 286643 b2dc6e6de6b6ed3a3a290ab85521ef4f591cea24
parent 286642 6a70e09504444427964381427f6008ee14f71fe4
child 286644 74f0c724abfc5ecfff2482098feb5d5986761f08
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1187055
milestone42.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 1187055 - check the proxy being destroyed has a wrapper before cleaning it up r=davidb All proxies should have wrappers on windows. So it doesn't make much sense that we need a null check here, however it seems to happen in the wild that proxy->GetWrapper() returns null.
accessible/windows/msaa/Platform.cpp
--- a/accessible/windows/msaa/Platform.cpp
+++ b/accessible/windows/msaa/Platform.cpp
@@ -44,16 +44,20 @@ a11y::ProxyCreated(ProxyAccessible* aPro
   aProxy->SetWrapper(reinterpret_cast<uintptr_t>(wrapper));
 }
 
 void
 a11y::ProxyDestroyed(ProxyAccessible* aProxy)
 {
   ProxyAccessibleWrap* wrapper =
     reinterpret_cast<ProxyAccessibleWrap*>(aProxy->GetWrapper());
+  MOZ_ASSERT(wrapper);
+  if (!wrapper)
+    return;
+
   wrapper->Shutdown();
   aProxy->SetWrapper(0);
   wrapper->Release();
 }
 
 void
 a11y::ProxyEvent(ProxyAccessible*, uint32_t)
 {