Bug 222605

Summary: Allow IDL `Date` to be parsed from a string in addition to a number and actual JS `Date`
Product: WebKit Reporter: Devin Rousso <hi>
Component: New BugsAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, alecflett, beidson, ews-watchlist, hi, jsbell, keith_miller, mark.lam, msaboff, saam, thorton, tzagallo, webkit-bug-importer, wenson_hsieh, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Devin Rousso
Reported 2021-03-02 09:50:50 PST
JS `Date` can be stringified into JSON, but cannot be parsed back into a JS `Date` without additional special logic. WebKit should also support parsing from a string (just like JS `Date.parse`) to generate a JS `Date`.
Attachments
Patch (5.85 KB, patch)
2021-03-02 10:08 PST, Devin Rousso
no flags
Patch (5.91 KB, patch)
2021-03-02 12:17 PST, Devin Rousso
no flags
Devin Rousso
Comment 1 2021-03-02 09:51:22 PST
Devin Rousso
Comment 2 2021-03-02 10:08:24 PST
Yusuke Suzuki
Comment 3 2021-03-02 11:15:16 PST
Comment on attachment 421958 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421958&action=review r=me > Source/WebCore/bindings/js/IDBBindingUtilities.cpp:207 > + auto dateValue = valueToDate(lexicalGlobalObject, value); Let's insert RETURN_IF_EXCEPTION(scope, { });.
Devin Rousso
Comment 4 2021-03-02 12:17:42 PST
EWS
Comment 5 2021-03-02 15:47:40 PST
Committed r273767: <https://commits.webkit.org/r273767> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421977 [details].
Note You need to log in before you can comment on or make changes to this bug.