CSP in C++: Should log different console message if parsing of source fails

RESOLVED FIXED in mozilla32

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ckerschb, Assigned: ckerschb)

Tracking

unspecified
mozilla32
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Currently we use policyURIParseError when parsing a source fails - we should make sure we are printing the best possible (most accurate) error message to the console for all the different parsing errors.
Assignee: nobody → mozilla
As discussed in person we should log more descriptive console messages if parsing fails for some cases. In particular, the use of 'policyURIParseError' is not the right message to use. I updated those cases and also think that mCurToken should be used instead of mCurValue, because mCurToken is the token that is currently being processed (e.g. http://test.com:88a) whereas in such a case mCurValue would be "" once we encountere the error after :88. I updated all the cases and the parser and verified that we log the most descriptive error message for developers to the console.
Attachment #8434296 - Flags: review?(sstamm)
Comment on attachment 8434296 [details] [diff] [review]
bug_1020407.patch

Review of attachment 8434296 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.  Good call on replacing mCurValue with mCurToken.
Attachment #8434296 - Flags: review?(sstamm) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4a005d1c687
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla32
https://hg.mozilla.org/mozilla-central/rev/d4a005d1c687
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.