script: Add line number argument to module script compilation functions#55121
Merged
jdm merged 3 commits intoweb-platform-tests:masterfrom Sep 30, 2025
Merged
script: Add line number argument to module script compilation functions#55121jdm merged 3 commits intoweb-platform-tests:masterfrom
jdm merged 3 commits intoweb-platform-tests:masterfrom
Conversation
wpt-pr-bot
approved these changes
Sep 28, 2025
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
The review process for this patch is being conducted in the Servo project.
86a08fd to
74782e9
Compare
Collaborator
Author
|
🛠 Changes from the source pull request (servo/servo#39544) can no longer be cleanly applied. Waiting for a new version of these changes downstream. |
af4498d to
e6777a4
Compare
Collaborator
Author
|
🛠 Changes from the source pull request (servo/servo#39544) can no longer be cleanly applied. Waiting for a new version of these changes downstream. |
e6777a4 to
a684b04
Compare
…& compile_module_script to fix the inline script reporting wrong line issue (web-platform-tests#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. Credits to JDM for actually pointing out which functions to fix. Testing: There are WPT tests for this change, specifically: tests/wpt/tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-5.html Signed-off-by: RichardTjokroutomo <[email protected]>
Testing: Modified code according to reviewer's comment. Signed-off-by: RichardTjokroutomo <[email protected]>
…ntics/scripting-1/the-script-element/module/evaluation-error-5.html : 11 Signed-off-by: RichardTjokroutomo <[email protected]>
a684b04 to
4f412ef
Compare
Collaborator
Author
|
⛔ The downstream PR has merged (servo/servo#39544), but these changes could not be merged properly. Please address any CI issues and try to merge manually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Script: added
line_noas argument to bothfetch_inline_module_script()&compile_module_script()to fix the inline script reporting wrong line issue (#39415).Originally, the function
compile_module_script()hardwires the value 1 when invokingCompileOptionsWrapper::new(). This is fine if the script is written in separate JS file, but for inline scripts, it will cause confusion if thescripttag doesn't start from line #1.line_nois obtained fromline_number, a member variable fromHTMLScriptElement.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
Reviewed in servo/servo#39544