RESOLVED FIXED 198574
JSON.parse throws incorrect exception when called w/o arguments
https://bugs.webkit.org/show_bug.cgi?id=198574
Summary JSON.parse throws incorrect exception when called w/o arguments
Alexey Shvayka
Reported 2019-06-05 11:19:48 PDT
Test case: JSON.parse() Expected: SyntaxError: JSON Parse error: Unexpected identifier "undefined" Actual: Error: JSON.parse requires at least one parameter ECMA-262: https://tc39.github.io/ecma262/#sec-json.parse No matter how many arguments are passed, `JSON.parse` always coerces first arg to string (step 1) and attempts to parse it (step 2). Other browsers throw SyntaxError.
Attachments
Patch (2.89 KB, patch)
2019-06-05 11:52 PDT, Alexey Shvayka
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.48 MB, application/zip)
2019-06-05 13:13 PDT, EWS Watchlist
no flags
Alexey Shvayka
Comment 1 2019-06-05 11:52:09 PDT
EWS Watchlist
Comment 2 2019-06-05 13:13:22 PDT
Comment on attachment 371426 [details] Patch Attachment 371426 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/12387336 New failing tests: http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html
EWS Watchlist
Comment 3 2019-06-05 13:13:23 PDT
Created attachment 371431 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.5
Yusuke Suzuki
Comment 4 2019-06-06 12:03:11 PDT
Comment on attachment 371426 [details] Patch r=me
WebKit Commit Bot
Comment 5 2019-06-06 12:08:01 PDT
Comment on attachment 371426 [details] Patch Clearing flags on attachment: 371426 Committed r246162: <https://trac.webkit.org/changeset/246162>
WebKit Commit Bot
Comment 6 2019-06-06 12:08:03 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-06-06 12:09:17 PDT
Note You need to log in before you can comment on or make changes to this bug.