mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
bug 1170153 - check documents have a docshell before trying to tell the parent process about new remote DocAccessibles r=davidb
We should never create DocAccessibles for documents that are going away so it seems like this shouldn't be necessary, but without a test case its hard to know why we are creating DocAccessibles for documents without docshells. So for now work around the issue and hope it doesn't matter in practice.
This commit is contained in:
parent
66a4503c62
commit
65b918141a
@ -457,10 +457,12 @@ DocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
|
||||
if (IPCAccessibilityActive()) {
|
||||
DocAccessibleChild* ipcDoc = new DocAccessibleChild(docAcc);
|
||||
docAcc->SetIPCDoc(ipcDoc);
|
||||
nsCOMPtr<nsITabChild> tabChild =
|
||||
do_GetInterface(aDocument->GetDocShell());
|
||||
static_cast<TabChild*>(tabChild.get())->
|
||||
SendPDocAccessibleConstructor(ipcDoc, nullptr, 0);
|
||||
nsIDocShell* docShell = aDocument->GetDocShell();
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsITabChild> tabChild = do_GetInterface(docShell);
|
||||
static_cast<TabChild*>(tabChild.get())->
|
||||
SendPDocAccessibleConstructor(ipcDoc, nullptr, 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
parentDocAcc->BindChildDocument(docAcc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user