Commit Graph

685 Commits

Author SHA1 Message Date
Robert Wilhelm f586348deb jscript: Cc_parser_parse implement '&&' expression.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49450
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 11:30:37 +02:00
Puetz Kevin A b60c4c6ef6 jscript: Fix `this` within IDispatchEx::InvokeEx.
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@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Jacek Caban fe0bd340cd jscript: Support passing non-string flags to RegExp constructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02:00
Jacek Caban 4e8874930a jscript: Support passing non-string pattern to RegExp constructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02:00
Jacek Caban 3e9d32ca43 jscript: Throw proper stack overflow exception.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 22:36:39 +02:00
Jacek Caban 6de0a658f1 jscript: Throw proper exception in RegExp.prototype.toString when called on non-RegExp object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 22:31:23 +02:00
Jacek Caban 6682290d17 jscript: Support ES5 Array.prototype.sort arguments handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 22:29:28 +02:00
Jeff Smith fd8e83eab0 jscript/tests: Fix some function-to-string failure message typos.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 22:54:26 +02:00
Jacek Caban 99929c0896 jscript: Clear SCRIPTITEM_CODEONLY flag on script re-initialization.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Jacek Caban 133918e69c jscript: Lookup the identifier in the named item's disp before the global context.
Based on patch by Gabriel Ivăncescu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Gabriel Ivăncescu fa0ec37077 jscript/tests: Add more persistent named items tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Gabriel Ivăncescu 8baf4a2a55 jscript/tests: Add tests for persistent named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 22:02:11 +01:00
Gabriel Ivăncescu 23bc78c199 jscript: Create separate script dispatches for each named item.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 19:36:41 +01:00
Jeff Smith 79cde059ea mshtml/tests: Add tests showing how toString has changed in IE9+.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 19:33:25 +01:00
Gabriel Ivăncescu c2402a92ae jscript: Retrieve the proper 'this' object for bytecodes with named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Gabriel Ivăncescu 5b28c43dd4 jscript: Don't lookup global members for bytecodes with a named item.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 10:04:00 +01:00
Gabriel Ivăncescu b526077189 jscript/tests: Add test for function constructor in named item context.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Gabriel Ivăncescu 335e0073c5 jscript: Retrieve the proper script dispatch from the named item in GetScriptDispatch.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Gabriel Ivăncescu f6201b4b11 jscript: Lookup the named item and keep a ref to it from the associated bytecode.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Gabriel Ivăncescu acb076c820 jscript: Lookup host global object on demand instead of storing it in script context.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:54:31 +01:00
Gabriel Ivăncescu eb80cc0f4a jscript/tests: Add tests for named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:50:15 +01:00
Jacek Caban 150b7391b8 jscript: Add GetSourceLineText implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Jacek Caban 348eef2e02 jscript: Add GetSourcePosition implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:04 +01:00
Jacek Caban ed3e5404dd jscript: Return error source and description from GetExceptionInfo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:04 +01:00
Jacek Caban f6c5da47f7 jscript: Suport generic error object for exception with no associated JavaScript exception value.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 16:24:51 +01:00
Jacek Caban 7548238297 jscript: Add IActiveScriptError implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban 33984c390d jscript: Use enter_script and leave_script to call script site notifications.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban 9a9a1821a3 jscript/tests: Add more script enter notification tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 21:24:01 +01:00
Jacek Caban f58420b4ad jscript/tests: Add more error reporting tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 21:23:58 +01:00
Jacek Caban fc009bf882 jscript/tests: Use wide char string literals in caller.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-15 22:03:36 +01:00
Jacek Caban 740bcc4bd7 jscript/tests: Use wide char string literals in activex.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-15 22:03:36 +01:00
Jacek Caban c2f94b8488 jscript/tests: Use wide char strings in a few more places.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 17:29:33 +01:00
Jacek Caban 1670e6e46a jscript/tests: Use wide char string literals instead of strcmp_wa.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 17:29:31 +01:00
Jacek Caban 0c0c5607f8 jscript/tests: Use wide char string literals instead of a2bstr.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 17:29:29 +01:00
Jacek Caban 363301a897 jscript/tests: Use wide char string literals instead of parse_script_a.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 17:29:27 +01:00
Jacek Caban 2a6119814a jscript/tests: Use wide char string literals instead of parse_htmlscript_a.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 17:29:25 +01:00
Jacek Caban 3fc0c96512 jscript/tests: Use wide char string literals instead of parse_script_with_error_a.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-14 17:29:21 +01:00
Nikolay Sivov aa3eb3015f jscript/tests: Add missing checks for Close() calls (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 21:51:20 +01:00
Jacek Caban 5bcc65d330 jscript/tests: Allow GetTypeInfo calls.
It's called by some win10 versions.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 21:26:04 +01:00
Gabriel Ivăncescu a416b0380e jscript/tests: Add more tests for the script TypeInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 21:02:01 +01:00
Gabriel Ivăncescu cf7a432df5 jscript/tests: Add initial tests for the script TypeInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Jacek Caban f34cecbae2 jscript: Treat only ASCII digits as digits.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 23:38:07 +01:00
Jacek Caban f51a80f4ac jscript/tests: Use wchar string literals instead of a2bstr helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 17:52:04 +01:00
Gabriel Ivăncescu c01b4bdebe jscript/tests: Add tests for pending and executed code persistence.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:49:08 +01:00
Gabriel Ivăncescu af245b027b jscript/tests: Use integers instead of booleans for counting call expectations.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:49:06 +01:00
Francois Gouget a22153005d jscript/tests: Fix the spelling of a couple of jscript ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Francois Gouget a4a1ba5a22 jscript/tests: Fix the spelling and slightly reword an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Francois Gouget 326fcdf967 jscript/tests: A spelling fix in an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Jacek Caban febfcdae40 jscript: Add support for parametrized compound assignments.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Jacek Caban 9dd50eae06 jscript: Allow 0x strings with explicit radix 16 in parseInt.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00