Closed Bug 1716549 Opened 3 years ago Closed 3 years ago

Improve MsaaAccessible::QueryInterface when the underlying Accessible is dead

Categories

(Core :: Disability Access APIs, defect, P1)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox89 --- unaffected
firefox90 --- wontfix
firefox91 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I hit a debug assertion today and it made me realise that MsaaAccessible::QueryInterface could be a little more correct in its handling of interfaces when the underlying Accessible dies. Right now, even querying IUnknown returns E_NOINTERFACE in this case, which is probably bad COM etiquette at best, a violation of the rules at worst. For the core interfaces which don't involve checking the Accessible or creating a new object (IUnknown, IDispatch, IAccessible), we can return the interface even if the Accessible is dead.

Blocks: 1713126

Returning E_NOINTERFACE for IUnknown at least is probably bad form.
Also, mscom::Interceptor seems to expect IDispatch to always be available and asserts if it isn't.
We're seeing some weird COM crashes in the wild, and while I don't know if this will fix them, correctness seems like a good place to start.

Set release status flags based on info from the regressing bug 1694865

Morgan, can you land the patch yourself, since James is away?
James said it might help with bug 1713126.

Flags: needinfo?(mreschenberg)

Yep, done :)

Flags: needinfo?(mreschenberg)
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f16d8d46efcb
Make MsaaAccessible::QueryInterface return interfaces that are always available even if the underlying Accessible is dead. r=morgan
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Blocks: 1711439
Has Regression Range: --- → yes
See Also: → 1710212
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: