[PATCH v2 2/3] jscript: Don't execute any functions if script state does not allow it.

Jacek Caban jacek at codeweavers.com
Fri Jun 3 11:14:55 CDT 2022

On 6/1/22 15:48, Gabriel Ivăncescu wrote:
> On 01/06/2022 03:07, Jacek Caban wrote:
>> On 5/31/22 16:56, Gabriel Ivăncescu wrote:
>>> Instead of only interpreted functions. Property retrievals or 
>>> setters are
>>> allowed though, as long as they are not accessors.
>>> Signed-off-by: Gabriel Ivăncescu<gabrielopcode at gmail.com>
>>> ---
>>> Note that native GetDispID seem to fail when retrieving 
>>> builtin/prototype
>>> functions (?) if script is uninitialized, but retrieving the DISPID 
>>> before and
>>> using it after it's uninitialized still works, though (that's what 
>>> the tests
>>> do). I don't think it's worth replicating this GetDispID quirk for 
>>> the moment.
>> I'm not really concerned about GetDispID quirks, but implication of 
>> your choice for the next patch. I think that releasing objects sooner 
>> is better, so it would be good to have a better argument for moving 
>> that. Your reasoning there is based on details of how you decided to 
>> not follow native here.
>> More generally, creating function objects in response for property 
>> get is an implementation detail that supposed to be transparent. If 
>> it's causing problems elsewhere, I'd first look at making it more 
>> transparent. In this case, maybe we should create function objects 
>> sooner, in response to GetDispID. This would both match all tests and 
>> allow us to release function constructor sooner.
>> Jacek
> Right, but how is releasing such objects not an implementation detail 
> as well?

It's an exposed behaviour, see the attached test. BTW, having tests like 
that may be nice to catch leaks and test GC in the future.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220603/80f21b0d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.diff
Type: text/x-patch
Size: 4603 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220603/80f21b0d/attachment.bin>

More information about the wine-devel mailing list