Closed
Bug 1167295
Opened 9 years ago
Closed 9 years ago
manage PDocAccessible with PBrowser instead of PContent
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: tbsaunde, Assigned: tbsaunde)
Details
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8608895 -
Flags: review?(bugs)
Comment 2•9 years ago
|
||
Comment on attachment 8608895 [details] [diff] [review]
manage PDocAccessible with PBrowser instead of PContent
> if (IPCAccessibilityActive()) {
> DocAccessibleChild* ipcDoc = new DocAccessibleChild(docAcc);
> docAcc->SetIPCDoc(ipcDoc);
>- auto contentChild = dom::ContentChild::GetSingleton();
>- contentChild->SendPDocAccessibleConstructor(ipcDoc, nullptr, 0);
>+ nsCOMPtr<nsITabChild> tabChild =
>+ do_GetInterface(aDocument->GetDocShell());
I would add a null check here, just in case document is about to die, it might not have docshell, or docshell
might not have owner anymore or something
> ipcDoc = new DocAccessibleChild(childDoc);
> childDoc->SetIPCDoc(ipcDoc);
>- auto contentChild = dom::ContentChild::GetSingleton();
>- contentChild->SendPDocAccessibleConstructor(ipcDoc, parentIPCDoc, id);
>+ nsCOMPtr<nsITabChild> tabChild =
>+ do_GetInterface(mDocument->DocumentNode()->GetDocShell());
ditto
Attachment #8608895 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #2)
> Comment on attachment 8608895 [details] [diff] [review]
> manage PDocAccessible with PBrowser instead of PContent
>
> > if (IPCAccessibilityActive()) {
> > DocAccessibleChild* ipcDoc = new DocAccessibleChild(docAcc);
> > docAcc->SetIPCDoc(ipcDoc);
> >- auto contentChild = dom::ContentChild::GetSingleton();
> >- contentChild->SendPDocAccessibleConstructor(ipcDoc, nullptr, 0);
> >+ nsCOMPtr<nsITabChild> tabChild =
> >+ do_GetInterface(aDocument->GetDocShell());
> I would add a null check here, just in case document is about to die, it
> might not have docshell, or docshell
> might not have owner anymore or something
So, my first reaction to that happening is that its a bug and it should never happen, but I'm willing to consider test cases of course. I suspect if it is actually possible we shouldn't fix it here, if the document is about to die we shouldn't create a DocAccessible so we shouldn't even get to creating an ipc actor for it. I'm not really sure there is any reasonable way to handle failure when you get to this point.
> > ipcDoc = new DocAccessibleChild(childDoc);
> > childDoc->SetIPCDoc(ipcDoc);
> >- auto contentChild = dom::ContentChild::GetSingleton();
> >- contentChild->SendPDocAccessibleConstructor(ipcDoc, parentIPCDoc, id);
> >+ nsCOMPtr<nsITabChild> tabChild =
> >+ do_GetInterface(mDocument->DocumentNode()->GetDocShell());
> ditto
more or less the same case.
Comment 5•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•