Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_provider.c:
- TRACE("Removing node %p\n", node);
- EnterCriticalSection(&provider_thread_cs);
- LIST_FOR_EACH_SAFE(cursor, cursor2, &provider_thread_nodes_list)
- {
prov = LIST_ENTRY(cursor, struct uia_provider_thread_list_entry, entry);
if (prov->node == node)
{
list_remove(cursor);
node_data = impl_from_IWineUiaNode((IWineUiaNode *)node);
node_data->in_provider_thread_list = FALSE;
found = TRUE;
heap_free(prov);
goto exit;
}
- }
Having to do a linear search seems not ideal. Could we put the list entry in the node itself instead?