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 de15290127
commit 5b4d8bad41

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);
}