Bug 272274

Summary: RegExp.prototype[Symbol.matchAll] doesn't respect `v` flag
Product: WebKit Reporter: Sosuke Suzuki <aosukeke>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description Sosuke Suzuki 2024-04-06 00:04:16 PDT
poc:

```js
function doMatchAll(regex) {
    const text = '𠮷a𠮷';
    const matches = [...RegExp.prototype[Symbol.matchAll].call(regex, text)];
    print(matches.map(match => match.index));
}

doMatchAll(/(?:)/g);
// expected: 0,1,2,3,4,5
// actual  : 0,1,2,3,4,5

doMatchAll(/(?:)/gu); // 0,2,3,5
// expected: 0,2,3,5
// actual  : 0,2,3,5

doMatchAll(/(?:)/gv); // 0,1,2,3,4,5
// expected: 0,2,3,5
// actual  : 0,1,2,3,4,5
```
Comment 1 Sosuke Suzuki 2024-04-06 00:10:11 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26933
Comment 2 EWS 2024-04-06 07:15:42 PDT
Committed 277160@main (4b84428a9535): <https://commits.webkit.org/277160@main>

Reviewed commits have been landed. Closing PR #26933 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2024-04-06 07:16:14 PDT
<rdar://problem/126017731>