bug 1186528 - don't create a DocAccessibleChild if we can't tell the parent process about it r=lsocks

This commit is contained in:
Trevor Saunders 2015-07-30 19:03:16 -04:00
parent 2b193a0d99
commit acbc7d7d5d

View File

@ -455,8 +455,6 @@ DocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
ApplicationAcc());
if (IPCAccessibilityActive()) {
DocAccessibleChild* ipcDoc = new DocAccessibleChild(docAcc);
docAcc->SetIPCDoc(ipcDoc);
nsIDocShell* docShell = aDocument->GetDocShell();
if (docShell) {
nsCOMPtr<nsITabChild> tabChild = do_GetInterface(docShell);
@ -465,6 +463,8 @@ DocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
// differently. It may be that this will cause us to fail to notify
// the parent process about important accessible documents.
if (tabChild) {
DocAccessibleChild* ipcDoc = new DocAccessibleChild(docAcc);
docAcc->SetIPCDoc(ipcDoc);
static_cast<TabChild*>(tabChild.get())->
SendPDocAccessibleConstructor(ipcDoc, nullptr, 0);
}