mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1241453 - assert accessibles are only added to non remote xpcAccessibleDocuments r=davidb
This commit is contained in:
parent
973d0ef356
commit
5aa2104440
@ -168,6 +168,7 @@ xpcAccessibleDocument::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
|
||||
xpcAccessibleGeneric*
|
||||
xpcAccessibleDocument::GetAccessible(Accessible* aAccessible)
|
||||
{
|
||||
MOZ_ASSERT(!mRemote);
|
||||
if (ToXPCDocument(aAccessible->Document()) != this) {
|
||||
NS_ERROR("This XPCOM document is not related with given internal accessible!");
|
||||
return nullptr;
|
||||
|
@ -25,10 +25,11 @@ class xpcAccessibleDocument : public xpcAccessibleHyperText,
|
||||
{
|
||||
public:
|
||||
explicit xpcAccessibleDocument(DocAccessible* aIntl) :
|
||||
xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength) { }
|
||||
xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength), mRemote(false) { }
|
||||
|
||||
xpcAccessibleDocument(ProxyAccessible* aProxy, uint32_t aInterfaces) :
|
||||
xpcAccessibleHyperText(aProxy, aInterfaces), mCache(kDefaultCacheLength) {}
|
||||
xpcAccessibleHyperText(aProxy, aInterfaces), mCache(kDefaultCacheLength),
|
||||
mRemote(true) {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(xpcAccessibleDocument,
|
||||
@ -72,6 +73,7 @@ private:
|
||||
|
||||
void NotifyOfShutdown(Accessible* aAccessible)
|
||||
{
|
||||
MOZ_ASSERT(!mRemote);
|
||||
xpcAccessibleGeneric* xpcAcc = mCache.GetWeak(aAccessible);
|
||||
if (xpcAcc)
|
||||
xpcAcc->Shutdown();
|
||||
@ -86,6 +88,7 @@ private:
|
||||
xpcAccessibleDocument& operator =(const xpcAccessibleDocument&) = delete;
|
||||
|
||||
nsRefPtrHashtable<nsPtrHashKey<const void>, xpcAccessibleGeneric> mCache;
|
||||
bool mRemote;
|
||||
};
|
||||
|
||||
inline xpcAccessibleGeneric*
|
||||
|
Loading…
Reference in New Issue
Block a user