| Summary: | \0 identity escapes should be syntax errors in Unicode patterns only | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alexey Shvayka <ashvayka> | ||||
| Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Trivial | CC: | commit-queue, darin, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
Created attachment 389508 [details]
Patch
The commit-queue encountered the following flaky tests while processing attachment 389508 [details]: editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org) The commit-queue is continuing to process your patch. Comment on attachment 389508 [details] Patch Clearing flags on attachment: 389508 Committed r255584: <https://trac.webkit.org/changeset/255584> All reviewed patches have been landed. Closing bug. |
Test case: new RegExp("\\\0", "u") Expected: SyntaxError thrown Actual: RegExp instance ECMA262: https://tc39.es/ecma262/#prod-annexB-IdentityEscape (/u flag precludes the use of SourceCharacterIdentityEscape) IdentityEscape[U, N] :: [~U] SourceCharacterIdentityEscape[?N] SourceCharacterIdentityEscape[N] :: [~N] SourceCharacter but not c SourceCharacter :: any Unicode code point Test262: https://test262.report/browse/built-ins/RegExp/unicode_restricted_identity_escape.js