Jacek Caban (@jacek) commented about dlls/jscript/jscript_main.c:
+ +struct thread_data *get_thread_data(void) +{ + struct thread_data *thread_data = TlsGetValue(jscript_tls); + + if(!thread_data) { + thread_data = calloc(1, sizeof(struct thread_data)); + if(!thread_data) + return NULL; + list_init(&thread_data->objects); + rb_init(&thread_data->weak_refs, weak_refs_compare); + TlsSetValue(jscript_tls, thread_data); + } + + return thread_data; +} Since this makes JScript unusable without thread data, I think it would be easier to just allocate that early when creating JScript object and simplify error handling in other places.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4640#note_55625