[PATCH v3 4/5] vbscript: Implement separate script dispatch objects for each named item.

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Feb 5 11:38:19 CST 2020


Sorry for the noise, but another idea just dawned on me.

What if we ref count the named_item_t itself, and store it from 
vbscode_t instead. Then, we set the item->script_obj to NULL when it has 
to be recreated (for persistent code). This shouldn't affect external 
users that hold ScriptDisp, since it's only referenced from vbscode_t.

Of course we still unlink the named item from the list when script is 
uninitialized, since that's what tests show.

This approach should, I think, fix all corner cases, even with multiple 
script dispatches referring to same named item.

Thoughts?



More information about the wine-devel mailing list