зеркало из https://github.com/mozilla/gecko-dev.git
bug 1241453 - assert accessibles are only added to non remote xpcAccessibleDocuments r=davidb
This commit is contained in:
Родитель
6b42e68369
Коммит
955114b39c
|
@ -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*
|
||||
|
|
Загрузка…
Ссылка в новой задаче