WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
227779
Our structured cloning implementation does not encode all of RegExp's flags
https://bugs.webkit.org/show_bug.cgi?id=227779
Summary
Our structured cloning implementation does not encode all of RegExp's flags
Chris Dumez
Reported
2021-07-07 16:44:35 PDT
Our structured cloning implementation does not encode all of RegExp's flags. This is causing WebKit to fail one of the subtests on
http://wpt.live/IndexedDB/structured-clone.any.html?61-80
. This subtest is passing in both Chrome and Firefox.
Attachments
Patch
(11.65 KB, patch)
2021-07-07 16:54 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(19.46 KB, patch)
2021-07-07 18:23 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2021-07-07 16:54:55 PDT
Created
attachment 433093
[details]
Patch
Yusuke Suzuki
Comment 2
2021-07-07 17:54:28 PDT
Comment on
attachment 433093
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=433093&action=review
> Source/WebCore/bindings/js/SerializedScriptValue.cpp:1256 > flags[flagCount++] = 'i'; > if (regExp->regExp()->multiline()) > flags[flagCount++] = 'm'; > + if (regExp->regExp()->dotAll()) > + flags[flagCount++] = 's'; > + if (regExp->regExp()->unicode()) > + flags[flagCount++] = 'u'; > + if (regExp->regExp()->sticky()) > + flags[flagCount++] = 'y';
Need to add `hasIndices` flag ("d") too (this is new flag introduced super recently). Also, can you add a test for "d" flag case?
Chris Dumez
Comment 3
2021-07-07 17:55:30 PDT
(In reply to Yusuke Suzuki from
comment #2
)
> Comment on
attachment 433093
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=433093&action=review
> > > Source/WebCore/bindings/js/SerializedScriptValue.cpp:1256 > > flags[flagCount++] = 'i'; > > if (regExp->regExp()->multiline()) > > flags[flagCount++] = 'm'; > > + if (regExp->regExp()->dotAll()) > > + flags[flagCount++] = 's'; > > + if (regExp->regExp()->unicode()) > > + flags[flagCount++] = 'u'; > > + if (regExp->regExp()->sticky()) > > + flags[flagCount++] = 'y'; > > Need to add `hasIndices` flag ("d") too (this is new flag introduced super > recently). > Also, can you add a test for "d" flag case?
Will do, thanks for pointing that out.
Chris Dumez
Comment 4
2021-07-07 18:23:02 PDT
Created
attachment 433105
[details]
Patch
Yusuke Suzuki
Comment 5
2021-07-07 18:58:15 PDT
Comment on
attachment 433105
[details]
Patch r=me
EWS
Comment 6
2021-07-07 19:19:26 PDT
Committed
r279706
(
239498@main
): <
https://commits.webkit.org/239498@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 433105
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-07-07 19:20:19 PDT
<
rdar://problem/80301211
>
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