bug 1213606 - work around proxy's that don't have a wrapper for their document r=davidb

This commit is contained in:
Trevor Saunders 2015-10-14 10:58:35 -04:00
parent 48d5a0eaf9
commit 35d1660e61

View File

@ -61,14 +61,17 @@ a11y::ProxyDestroyed(ProxyAccessible* aProxy)
auto doc = auto doc =
static_cast<DocProxyAccessibleWrap*>(WrapperFor(aProxy->Document())); static_cast<DocProxyAccessibleWrap*>(WrapperFor(aProxy->Document()));
MOZ_ASSERT(doc);
if (doc) {
#ifdef _WIN64 #ifdef _WIN64
uint32_t id = wrapper->GetExistingID(); uint32_t id = wrapper->GetExistingID();
if (id != AccessibleWrap::kNoID) { if (id != AccessibleWrap::kNoID) {
doc->RemoveID(id); doc->RemoveID(id);
} }
#else #else
doc->RemoveID(-reinterpret_cast<int32_t>(wrapper)); doc->RemoveID(-reinterpret_cast<int32_t>(wrapper));
#endif #endif
}
wrapper->Shutdown(); wrapper->Shutdown();
aProxy->SetWrapper(0); aProxy->SetWrapper(0);