Bug
1856235 [wpt PR 42269] - LoAF: change the way script nesting is handled, a=testonly
Automatic update from web-platform-tests
LoAF: change the way script nesting is handled
The logic to avoid nested scripts (only count for entry points)
was not handling the fact that script blocks can be nested in
callbacks and vice-versa.
The stack is a lot clearer now, with all script probes calling
PushScriptEntryPoint & PopScriptEntryPoint, the exception being
promise-resolver, which pops only when the task is complete.
The probe handling for script blocks is now changed, so that
ExecuteScript either creates a module entry or sets the execution time
on a script that has started.
Moved script internal timings (layout/style/alert/sync-XHR) to the end of the file (unmodified).
Added a few tests that reproduce the nesting issue, and removed the test
that relies on trusted-types as we don't require that dependency.
Also this fix changes a few existing test results:
- A script block executed synchronously from within a callback is
attributed to the callback, as it's nested. The way to reproduce
a top level classic script block is to have it parsed from the
HTML.
- There is no more "execute-script" type, that's now a module.
Bug:
1485516
Change-Id: I405f1075191d8c16084b06866fba49a8d5f6e023
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
4907347
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1207104}
--
wpt-commits:
dea33c4db773deca29da6e7494c93bc8dd42826a
wpt-pr: 42269