forked from mirrors/gecko-dev
Bug 1896816: Fail gracefully if a naughty client tries to QueryInterface on an MsaaAccessible from the wrong thread. r=eeejay
JAWS apparently does this sometimes. In particular, this was causing a crash when we tried to check the UIA pref because that pref can only be accessed from the main thread. Differential Revision: https://phabricator.services.mozilla.com/D210417
This commit is contained in:
parent
4ac50f3930
commit
0156e587e9
1 changed files with 7 additions and 0 deletions
|
|
@ -508,6 +508,13 @@ MsaaAccessible::QueryInterface(REFIID iid, void** ppv) {
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NS_WARN_IF(!NS_IsMainThread())) {
|
||||||
|
// Bug 1896816: JAWS sometimes traverses into Gecko UI from a file dialog
|
||||||
|
// thread. It shouldn't do that, but let's fail gracefully instead of
|
||||||
|
// crashing.
|
||||||
|
return RPC_E_WRONG_THREAD;
|
||||||
|
}
|
||||||
|
|
||||||
// These interfaces are always available. We can support querying to them
|
// These interfaces are always available. We can support querying to them
|
||||||
// even if the Accessible is dead.
|
// even if the Accessible is dead.
|
||||||
if (IID_IUnknown == iid) {
|
if (IID_IUnknown == iid) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue