mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
bug 1339472 - keep a map from DocAccessibleParents to the actors themselves r=yzen
This commit is contained in:
parent
f85117da36
commit
9f62f9a5c1
@ -36,6 +36,7 @@ public:
|
||||
{ MOZ_COUNT_CTOR_INHERITED(DocAccessibleParent, ProxyAccessible); }
|
||||
~DocAccessibleParent()
|
||||
{
|
||||
LiveDocs().Remove(IProtocol::Id());
|
||||
MOZ_COUNT_DTOR_INHERITED(DocAccessibleParent, ProxyAccessible);
|
||||
MOZ_ASSERT(mChildDocs.Length() == 0);
|
||||
MOZ_ASSERT(!ParentDoc());
|
||||
@ -58,6 +59,11 @@ public:
|
||||
mShutdown = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add this document to the set of tracked documents.
|
||||
*/
|
||||
void AddToMap() { LiveDocs().Put(IProtocol::Id(), this); }
|
||||
|
||||
/*
|
||||
* Called when a message from a document in a child process notifies the main
|
||||
* process it is firing an event.
|
||||
@ -222,6 +228,13 @@ private:
|
||||
nsTHashtable<ProxyEntry> mAccessibles;
|
||||
bool mTopLevel;
|
||||
bool mShutdown;
|
||||
|
||||
static nsDataHashtable<nsUint64HashKey, DocAccessibleParent*>&
|
||||
LiveDocs()
|
||||
{
|
||||
static nsDataHashtable<nsUint64HashKey, DocAccessibleParent*> sLiveDocs;
|
||||
return sLiveDocs;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -917,6 +917,7 @@ TabParent::RecvPDocAccessibleConstructor(PDocAccessibleParent* aDoc,
|
||||
{
|
||||
#ifdef ACCESSIBILITY
|
||||
auto doc = static_cast<a11y::DocAccessibleParent*>(aDoc);
|
||||
doc->AddToMap();
|
||||
|
||||
// If this tab is already shutting down just mark the new actor as shutdown
|
||||
// and ignore it. When the tab actor is destroyed it will be too.
|
||||
|
Loading…
Reference in New Issue
Block a user