Closed
Bug 1310056
Opened 8 years ago
Closed 8 years ago
Implement compatibility hack for RPC_E_CANTCALLOUT_ININPUTSYNCCALL
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla55
People
(Reporter: bugzilla, Assigned: bugzilla)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [aes+][JAWS])
Attachments
(3 files)
(deleted),
patch
|
m_kato
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
m_kato
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
davidb
:
review+
|
Details | Diff | Splinter Review |
See https://bugzilla.mozilla.org/show_bug.cgi?id=1297549#c14.
If making a call on a COM proxy from an STA when InSendMessageEx reports that the thread is blocking, the call will fail with RPC_E_CANTCALLOUT_ININPUTSYNCCALL.
This is overkill in our case because our proxies go into the content MTA and don't reenter the chrome STA.
a11y clients can be modified to fix this (and Jamie has already landed one patch to NVDA), but I don't think we can count on that from a compat perspective.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8800909 [details] [diff] [review]
Part 1 - Enhancements to DLL interceptor
This patch adds x86 support for prefix groups 1 and 2 (as denoted by the Intel processor manuals) since I don't expect those prefixes to affect operand or address size. We explicitly fail if either group 3 or 4 prefixes are present.
In the future I'd like to do some further work for amd64 as well as generally clean up the detour patcher so that it better exhibits the structure of the instruction set, but I want to land the minimum right now.
Attachment #8800909 -
Flags: review?(m_kato)
Updated•8 years ago
|
Attachment #8800909 -
Flags: review?(m_kato) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: leave-open
Assignee | ||
Comment 3•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/92d09cb049f594de283a06e111a2faaf74fbeb21
Bug 1310056: Part 1 - DllInterceptor improvements to support InSendMessageEx; r=m_kato
Backed out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=37993046&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/e151b7a9b0c7d327d5800004d7a5d90474317235
Flags: needinfo?(aklotz)
Assignee | ||
Comment 5•8 years ago
|
||
Verified by try push and also running locally on 32-bit and 64-bit Windows 10.
Flags: needinfo?(aklotz)
Attachment #8804556 -
Flags: review?(m_kato)
Updated•8 years ago
|
Attachment #8804556 -
Flags: review?(m_kato) → review+
Assignee | ||
Comment 6•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7d456e23a2ca3935fd0555089ba554297236aaef
Bug 1310056: Part 1 - DllInterceptor improvements to support InSendMessageEx; r=m_kato
https://hg.mozilla.org/integration/mozilla-inbound/rev/089321ce84cf731602a9979f3af1d6ecef5c0270
Bug 1310056: Part 2 - Additional DLL interceptor enhancements; r=m_kato
Comment 7•8 years ago
|
||
bugherder |
Assignee | ||
Comment 8•8 years ago
|
||
Assignee | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Mass wontfix for bugs affecting firefox 52.
Assignee | ||
Comment 11•8 years ago
|
||
This patch is required for JAWS. Initial r? to davidb since he wrote a bunch of this.
If we are running a known AT (except for NVDA, which doesn't suffer from this), we set a special exception handler that lets us intercept RPC_E_CANTCALLOUT_ININPUTSYNCCALL errors. When we see one of these, we enable the compatibility hack.
The hack causes InSendMessageEx to return ISMEX_NOTIFY when invoked by COM.
Attachment #8860188 -
Flags: review?(dbolter)
Assignee | ||
Updated•8 years ago
|
Comment 13•8 years ago
|
||
Comment on attachment 8860188 [details] [diff] [review]
Part 3: Detect RPC_E_CANTCALLOUT_ININPUTSYNCCALL errors and lazily enable compatibility hack
Review of attachment 8860188 [details] [diff] [review]:
-----------------------------------------------------------------
r=me
TIL.
Sort of worrying but I think I'm okay with your choice of not doing the hack for Compatibility::UNKNOWN.
::: accessible/windows/msaa/Compatibility.cpp
@@ +47,5 @@
> ////////////////////////////////////////////////////////////////////////////////
> // Compatibility
> ////////////////////////////////////////////////////////////////////////////////
>
> +static WindowsDllInterceptor sUser32Interceptor;
(nit: naming-wise I think this is named sUser32Intercept elsewhere, in nsWindow, and plugin code, but I think prefer this noun version)
@@ +73,5 @@
> + * InSendMessageEx reports that the calling thread is blocked, that you'll
> + * deadlock your own process. It returns the RPC_E_CANTCALLOUT_ININPUTSYNCCALL
> + * error code. This is not actually true in our case: we are calling into
> + * the multithreaded apartment via ALPC. In this hook, we check to see if the
> + * caller is COM, and if so, we lie to it.
This is sort of terrifying, but hey why not.
Attachment #8860188 -
Flags: review?(dbolter) → review+
Assignee | ||
Comment 14•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/59b0e09a9c929c86ec63f043968b83e035a7deda
Bug 1310056: Compatibility hack for mitigating RPC_E_CANTCALLOUT_ININPUTSYNCCALL; r=davidb
Comment 15•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•