Opened 7 years ago

Closed 7 years ago

#16261 closed defect (invalid)

[patch][ccla] JSON parsing tests should use strict parsing

Reported by: andybalaam Owned by: andybalaam
Priority: undecided Milestone: 1.9
Component: Core Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

Some of the tests in dojo/tests/json.js don't pass the "strict" flag to the JSON.parse function.

This flag has no effect in environments which provide a built-in JSON object.

In environments that fall back to the Dojo JSON parsing, this flag enables the safety check regular expression.

To ensure there are no bugs in this regular expression, we should pass strict=true to JSON.parse in all tests.

Andy Balaam (IBM, CCLA)

Attachments (1)

always-use-strict-mode-in-json-parsing-tests.patch (2.0 KB) - added by andybalaam 7 years ago.
[patch][ccla] always-use-strict-mode-in-json-parsing-tests Andy Balaam (IBM, CCLA)

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by andybalaam

[patch][ccla] always-use-strict-mode-in-json-parsing-tests Andy Balaam (IBM, CCLA)

comment:1 Changed 7 years ago by bill

Component: TestFrameworkCore
Owner: set to Kris Zyp
Status: newassigned

The

Version 0, edited 7 years ago by bill (next)

comment:2 Changed 7 years ago by andybalaam

OK, sorry about that bill, thanks.

comment:3 Changed 7 years ago by dylan

Milestone: tbd1.9

Kris, please review this one as well for 1.9.

comment:4 Changed 7 years ago by Kris Zyp

We do have strict tests to that exercise the regular expressions (in older IE). If we made all the tests strict than we wouldn't be verifying the non-script code path would we?

comment:5 Changed 7 years ago by bill

Owner: changed from Kris Zyp to andybalaam
Status: assignedpending

comment:6 Changed 7 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.