Closed
Bug 1250254
Opened 8 years ago
Closed 8 years ago
Enable ESLint "no-throw-literal" rule for PSM
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: Cykesiopka, Assigned: Cykesiopka)
References
Details
Attachments
(1 file)
See Bug 1246594 comment 0 for why doing this is beneficial. tl;dr: |throw new Error("Foo")| will provide actual line numbers!
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/37339/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/37339/
Attachment #8725115 -
Flags: review?(dkeeler)
Assignee | ||
Comment 2•8 years ago
|
||
https://reviewboard.mozilla.org/r/37339/#review33891 A few notes: - See Bug 1251003 comment 0 for why the .eslintrc -> .eslintrc.json rename was done. - ESLint doesn't actually catch something like |throw Cr.NS_ERROR_FAILURE|, maybe because it can't tell NS_ERROR_FAILURE is basically a number.
Comment on attachment 8725115 [details] MozReview Request: Bug 1250254 - Enable ESLint "no-throw-literal" rule for PSM. https://reviewboard.mozilla.org/r/37339/#review34235 LGTM. ::: security/manager/tools/genHPKPStaticPins.js:129 (Diff revision 1) > - throw `ERROR: problem downloading '${filename}': status ${req.status}`; > + throw new Error("ERROR: problem downloading '" + filename + "': status " + I'm assuming the switch from template strings is because of line length?
Attachment #8725115 -
Flags: review?(dkeeler) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://reviewboard.mozilla.org/r/37339/#review34235 Thanks! > I'm assuming the switch from template strings is because of line length? Yes. Sadly there doesn't seem to be a way to have a multi-line template literal ignore inner whitespace without using a tag function or something.
Assignee | ||
Comment 5•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=34a1cec792f5
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b670d8ff99ca
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•