script: Add line number argument to module script compilation functions#39544
script: Add line number argument to module script compilation functions#39544jdm merged 6 commits intoservo:mainfrom
Conversation
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#55121) with upstreamable changes. |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#55121) title and body. |
|
🔨 Triggering try run (#18070716458) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18070716458): Flaky unexpected result (22)
Stable unexpected results that are known to be intermittent (30)
|
|
✨ Try run (#18070716458) succeeded. |
mrobinson
left a comment
There was a problem hiding this comment.
Thanks! I've left some comments above:
tests/wpt/tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-5.html
Outdated
Show resolved
Hide resolved
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#55121) title and body. |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55121). |
|
🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync. |
9e46619 to
0f1c5b9
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55121). |
jdm
left a comment
There was a problem hiding this comment.
This looks good! Just one comment suggestion to allow the linter line length check to pass.
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55121). |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55121). |
|
🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync. |
fed0107 to
f3829af
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55121). |
…& compile_module_script to fix the inline script reporting wrong line issue (servo#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]>
Co-authored-by: Josh Matthews <[email protected]> Signed-off-by: Rocketjumper <[email protected]>
Co-authored-by: Euclid Ye <[email protected]> Signed-off-by: Rocketjumper <[email protected]>
Signed-off-by: RichardTjokroutomo <[email protected]>
…ntics/scripting-1/the-script-element/module/evaluation-error-5.html : 11 Signed-off-by: RichardTjokroutomo <[email protected]>
f3829af to
d65c7df
Compare
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55121). |
|
⛔ Failed to properly merge the upstream pull request (web-platform-tests/wpt#55121). Please address any CI issues and try to merge manually. |
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 the<script>tag 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