WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155332
[ES6] RegExp sticky flag should be ignored in String.match when global flag is given
https://bugs.webkit.org/show_bug.cgi?id=155332
Summary
[ES6] RegExp sticky flag should be ignored in String.match when global flag i...
Michael Saboff
Reported
2016-03-10 15:29:03 PST
In change set
r197869
, logic was added to handle String.match(re) when the RegExp has both the global and sticky flags set. In the ES6 spec, section 21.2.5.6 step 6 that describes operation when the global flag is set doesn't reference the sticky flag or any operational changes due to the sticky flag. When the global flag is not set, step 5 of the same section says that the operation is the same s RegExpExec, which does have sticky dependent behavior. Therefore, the logic that handles when both the sticky and global flags are set should be removed.
Attachments
Patch
(2.81 KB, patch)
2016-03-10 15:33 PST
,
Michael Saboff
saam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Saboff
Comment 1
2016-03-10 15:33:22 PST
Created
attachment 273637
[details]
Patch
Saam Barati
Comment 2
2016-03-10 15:37:19 PST
Comment on
attachment 273637
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273637&action=review
> Source/JavaScriptCore/runtime/StringPrototype.cpp:1057 > + if (!global && (sticky = regExp->sticky())) {
I think this is easier to read if the sticky isn't assigned in the "if"
Michael Saboff
Comment 3
2016-03-10 15:48:46 PST
Committed
r197963
: <
http://trac.webkit.org/changeset/197963
>
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