github web-platform-tests/wpt merge_pr_46303

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
9 months ago

Use ConsumeRestrictedPropertyValue() when testing variable-using property validity.

Earlier, the property parser would only receive values that were checked
using ConsumeRestrictedPropertyValue(), which has a fail-fast whenever
it sees a left brace. However, with the streaming parser being used for
value parsing, we just consumed until the end of the semicolon instead,
which is correct but misses the fail-fast, causing potential O(n²)
behavior with nested rules. Reintroduce it.

This also fixes an issue where, if we failed to parse the last token,
we could have stream_.Offset() at the end of the parse never advancing
past the initial lookahead offset, causing an integer overflow.

Fixed: 340702955
Fixed: 340919085
Change-Id: I5d9814f87536e8cc7dc6742a39f22abd83c40d85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5543881
Auto-Submit: Steinar H Gunderson sesse@chromium.org
Reviewed-by: Anders Hartvoll Ruud andruud@chromium.org
Commit-Queue: Steinar H Gunderson sesse@chromium.org
Cr-Commit-Position: refs/heads/main@{#1301864}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.