WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
204067
RegExpBuiltinExec should create "groups" property unconditionally
https://bugs.webkit.org/show_bug.cgi?id=204067
Summary
RegExpBuiltinExec should create "groups" property unconditionally
Alexey Shvayka
Reported
2019-11-11 06:03:44 PST
Test case: /\d/.exec("1").hasOwnProperty("groups") Expected: true Actual: false Also, "groups" object should have `null` [[Prototype]]. Discussion:
https://github.com/tc39/proposal-regexp-named-groups/issues/34
ECMA262:
https://tc39.es/ecma262/#sec-regexpbuiltinexec
(step 24) Test262:
https://test262.report/browse/built-ins/RegExp/named-groups/groups-object-undefined.js
https://test262.report/browse/built-ins/RegExp/named-groups/groups-object.js
Attachments
Patch
(15.45 KB, patch)
2019-11-11 06:45 PST
,
Alexey Shvayka
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2019-11-11 06:45:43 PST
Created
attachment 383266
[details]
Patch
Alexey Shvayka
Comment 2
2019-11-11 07:11:28 PST
I am adding this bug as a blocker of RegExp Match Indices proposal (
https://bugs.webkit.org/show_bug.cgi?id=202475
), because "indices" property should be created after "groups" (order is observable), and the way we currently add properties in RegExpMatchesArray.cpp/createStructureImpl will make that unnecessarily tricky.
Ross Kirsling
Comment 3
2019-11-12 13:26:24 PST
Comment on
attachment 383266
[details]
Patch Nice!
WebKit Commit Bot
Comment 4
2019-11-12 14:09:44 PST
Comment on
attachment 383266
[details]
Patch Clearing flags on attachment: 383266 Committed
r252374
: <
https://trac.webkit.org/changeset/252374
>
WebKit Commit Bot
Comment 5
2019-11-12 14:09:45 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2019-11-12 14:10:16 PST
<
rdar://problem/57130089
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug