mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1196460 - remove proxy's ids when they are destroyed r=surkov
This commit is contained in:
parent
61e40ac5c7
commit
20ef8ce558
@ -60,8 +60,6 @@ static gAccessibles = 0;
|
||||
|
||||
#ifdef _WIN64
|
||||
IDSet AccessibleWrap::sIDGen;
|
||||
|
||||
static const uint32_t kNoID = 0;
|
||||
#endif
|
||||
|
||||
static const int32_t kIEnumVariantDisconnected = -1;
|
||||
|
@ -177,6 +177,11 @@ public: // construction, destruction
|
||||
|
||||
static IDispatch* NativeAccessible(Accessible* aAccessible);
|
||||
|
||||
#ifdef _WIN64
|
||||
uint32_t GetExistingID() const { return mID; }
|
||||
static const uint32_t kNoID = 0;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual ~AccessibleWrap();
|
||||
|
||||
|
@ -59,6 +59,17 @@ a11y::ProxyDestroyed(ProxyAccessible* aProxy)
|
||||
if (!wrapper)
|
||||
return;
|
||||
|
||||
auto doc =
|
||||
static_cast<DocProxyAccessibleWrap*>(WrapperFor(aProxy->Document()));
|
||||
#ifdef _WIN64
|
||||
uint32_t id = wrapper->GetExistingID();
|
||||
if (id != AccessibleWrap::kNoID) {
|
||||
doc->RemoveID(id);
|
||||
}
|
||||
#else
|
||||
doc->RemoveID(-reinterpret_cast<int32_t>(wrapper));
|
||||
#endif
|
||||
|
||||
wrapper->Shutdown();
|
||||
aProxy->SetWrapper(0);
|
||||
wrapper->Release();
|
||||
|
Loading…
Reference in New Issue
Block a user