servo/tests
Rocketjumper 91e4188a64
script: Add line number argument to module script compilation functions (#39544)
Script: added ```line_no``` as argument to both
```fetch_inline_module_script()``` & ```compile_module_script()``` to
fix the inline script reporting wrong line issue
([#39415](https://github.com/servo/servo/issues/39415)).

Originally, the function ```compile_module_script()``` hardwires the
value 1 when invoking ```CompileOptionsWrapper::new()```. This is fine
if the script is written in separate JS file, but for inline scripts, it
will cause confusion if the ```<script>``` tag doesn't start from line
#1.

```line_no``` is obtained from ```line_number```, a member variable from ```HTMLScriptElement```. 

Credits to @jdm for actually pointing out which functions to fix.

Testing: Created a WPT test for this change, specifically: ```tests/wpt/tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-5.html```.

Fixes: issue [#39415](https://github.com/servo/servo/issues/39415)

---------

Signed-off-by: RichardTjokroutomo <richard.tjokro2@gmail.com>
Signed-off-by: Rocketjumper <112361665+RichardTjokroutomo@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-09-30 05:42:32 +00:00
..
blink_perf_tests tests: Vendor blink perf tests (#38654) 2025-08-17 09:54:04 +00:00
dromaeo
html layout: Support wavy and double for text-decoration-line (#37079) 2025-05-22 17:42:50 +00:00
jquery
power
unit tidy: Add a rule ensuring that // comments are followed by a space in Rust (#38698) 2025-08-18 12:09:09 +00:00
wpt script: Add line number argument to module script compilation functions (#39544) 2025-09-30 05:42:32 +00:00