[PATCH] jscript: Fix `this` within IDispatchEx::InvokeEx

Alexandre Julliard julliard at winehq.org
Thu Jul 23 15:02:09 CDT 2020


Jacek Caban <jacek at codeweavers.com> writes:

> From: Puetz Kevin A <PuetzKevinA at JohnDeere.com>
>
> Latent bug revealed by 614ea7e6243ead003bcfe4624895154972f3445f;
> Now that cross-context calls go through disp_call* instead of
> jsdisp_call*, and thus through InvokeEx, the `this` pointer is
> lost when calling methods inherited from a prototype.
>
> Signed-off-by: Kevin Puetz <PuetzKevinA at JohnDeere.com>
> Signed-off-by: Jacek Caban <jacek at codeweavers.com>
> ---
>  dlls/jscript/dispex.c    |  8 ++--
>  dlls/jscript/tests/run.c | 89 +++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 92 insertions(+), 5 deletions(-)

This is breaking tests:

../../../tools/runtest -q -P wine -T ../../.. -M mshtml.dll -p mshtml_test.exe script && touch script.ok
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
script.c:624: Test failed: L"/events.html: this !== window"
make: *** [Makefile:507: script.ok] Error 12

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list