uiautomationcore: Retrieve runtime ID on UiaReturnRawElementProvider thread to preven...
commitb04acc81d0ae7b354b37025ddb98a3394d5a54d7
authorConnor McAdams <cmcadams@codeweavers.com>
Thu, 16 Feb 2023 18:21:20 +0000 (16 13:21 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 28 Apr 2023 18:56:12 +0000 (28 20:56 +0200)
tree72a8ffc10de5ffeea3f2cc496c1d0f7484640f83
parent5bd409070556980edb2683c6a1d99beee7cb7cec
uiautomationcore: Retrieve runtime ID on UiaReturnRawElementProvider thread to prevent a deadlock.

If we pass a node to the provider thread that contains a provider
that was created in an STA with the ProviderOptions_UseComThreading
flag set, we can deadlock when attempting to get a runtime ID from the
proxy due to the message queue not being pumped. To avoid this, retrieve
the runtime ID before passing the node to the provider thread.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
dlls/uiautomationcore/tests/uiautomation.c
dlls/uiautomationcore/uia_provider.c