[PATCH] jscript: Fix `this` within IDispatchEx::InvokeEx
From: Puetz Kevin A <PuetzKevinA(a)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(a)JohnDeere.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/jscript/dispex.c | 8 ++-- dlls/jscript/tests/run.c | 89 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 5 deletions(-)
Jacek Caban <jacek(a)codeweavers.com> writes:
From: Puetz Kevin A <PuetzKevinA(a)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(a)JohnDeere.com> Signed-off-by: Jacek Caban <jacek(a)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(a)winehq.org
participants (2)
-
Alexandre Julliard -
Jacek Caban