Closed
Bug 1220237
Opened 9 years ago
Closed 9 years ago
remove uses of nsIEnumerator from PSM
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: keeler, Assigned: Cykesiopka)
References
Details
(Keywords: addon-compat)
Attachments
(1 file)
The comment in nsIEnumerator.idl indicates it should not be used:
/*
* DO NOT USE THIS INTERFACE. IT IS HORRIBLY BROKEN, USES NS_COMFALSE
* AND IS BASICALLY IMPOSSIBLE TO USE CORRECTLY THROUGH PROXIES OR
* XPCONNECT. IF YOU SEE NEW USES OF THIS INTERFACE IN CODE YOU ARE
* REVIEWING, YOU SHOULD INSIST ON nsISimpleEnumerator.
*
* DON'T MAKE ME COME OVER THERE.
*/
ಠ_ಠ
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → cykesiopka.bmo
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/36077/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/36077/
Attachment #8722533 -
Flags: review?(dkeeler)
Reporter | ||
Updated•9 years ago
|
Attachment #8722533 -
Flags: review?(dkeeler) → review+
Reporter | ||
Comment 2•9 years ago
|
||
Comment on attachment 8722533 [details]
MozReview Request: Bug 1220237 - Remove uses of nsIEnumerator from PSM. r=keeler
https://reviewboard.mozilla.org/r/36077/#review33037
This looks great. I just had a few comments on the tests.
::: security/manager/ssl/tests/unit/test_pkcs11_list.js:19
(Diff revision 1)
> +function checkTestModuleMissing() {
Maybe "NotPresent" instead of "Missing"?
::: security/manager/ssl/tests/unit/test_pkcs11_list.js:70
(Diff revision 1)
> + } catch (e) {}
Do we want to hide potential exceptions? Is the potential failure here "it was already unloaded"? Maybe we could check for that and re-throw if that's not the error.
Assignee | ||
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/36077/#review33037
Thanks for the review!
> Do we want to hide potential exceptions? Is the potential failure here "it was already unloaded"? Maybe we could check for that and re-throw if that's not the error.
Yes, the potential failure here is mainly "it was already unloaded". In particular, we delete the module near the end, so in a normal run having the cleanup code delete the module again will result in an exception being thrown. For xpcshell tests, I guess cleanup like this isn't strictly necessary, but doing so does seem like best practice. I'll add a comment explaining this.
With regards to hiding exceptions, we call deleteModule() without a try-catch at line 87, so I think we already have sufficient coverage for the method throwing unexpectedly.
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8722533 [details]
MozReview Request: Bug 1220237 - Remove uses of nsIEnumerator from PSM. r=keeler
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36077/diff/1-2/
Attachment #8722533 -
Attachment description: MozReview Request: Bug 1220237 - Remove uses of nsIEnumerator from PSM. → MozReview Request: Bug 1220237 - Remove uses of nsIEnumerator from PSM. r=keeler
Assignee | ||
Comment 5•9 years ago
|
||
Keywords: checkin-needed
Keywords: checkin-needed
Comment 7•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Assignee | ||
Updated•9 years ago
|
Keywords: addon-compat
You need to log in
before you can comment on or make changes to this bug.
Description
•