Closed
Bug 1147247
Opened 11 years ago
Closed 11 years ago
Use PRErrorCodeSuccess constant instead of literal 0 to represent success in PSM xpcshell tests
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla40
| Tracking | Status | |
|---|---|---|
| firefox40 | --- | fixed |
People
(Reporter: Cykesiopka, Assigned: Cykesiopka)
References
Details
Attachments
(1 file)
|
389.36 KB,
patch
|
keeler
:
review+
|
Details | Diff | Splinter Review |
(In reply to David Keeler [:keeler] (use needinfo?) from Bug 996872 comment #2)
> As far as I can tell, 0 isn't a registered PRErrorCode. I think it's
> probably ok to use it to mean success, but it would be good to be more clear
> about that [...]
> [...] (I
> would say just use Cr.NS_OK, but while I think its value is 0, I'm not sure
> that's guaranteed to always be the case, and we don't want to overlap our
> PRErrorCode space.)
And indeed there are some tests that incorrectly use Cr.NS_OK, and only happen to pass because Cr.NS_OK currently has a value of 0.
| Assignee | ||
Comment 1•11 years ago
|
||
I'm sorry if your eyes bleed...
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecc2f2b1e9ca
Assignee: nobody → cykesiopka.bmo
Status: NEW → ASSIGNED
Attachment #8584956 -
Flags: review?(dkeeler)
Comment 2•11 years ago
|
||
Comment on attachment 8584956 [details] [diff] [review]
bug1147247_PRErrorCodeSuccess-vs-literal-0_v1.patch
Review of attachment 8584956 [details] [diff] [review]:
-----------------------------------------------------------------
Great - thanks. I reviewed a few of the automatically-generated tests, but not all of them (the changes to generate.py look correct).
Attachment #8584956 -
Flags: review?(dkeeler) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
Thanks for the review.
(Try push is in Comment 1)
Keywords: checkin-needed
Comment 4•11 years ago
|
||
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•