Closed
Bug 1182959
Opened 9 years ago
Closed 9 years ago
Use nsTHashTable::Iterator in security/
Categories
(Core :: Security, defect)
Core
Security
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(5 files)
2.59 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
3.69 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
3.21 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
5.50 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
12.97 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
Because iterators are so much nicer than enumerate functions. There are eight occurrences of EnumerateEntries() in security/ to be dealt with.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8635853 -
Flags: review?(honzab.moz)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8635854 -
Flags: review?(honzab.moz)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8635855 -
Flags: review?(honzab.moz)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8635856 -
Flags: review?(honzab.moz)
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8635857 -
Flags: review?(honzab.moz)
Comment 6•9 years ago
|
||
Comment on attachment 8635853 [details] [diff] [review] (part 1) - Use nsTHashtable::Iterator in CertBlockList Review of attachment 8635853 [details] [diff] [review]: ----------------------------------------------------------------- ::: security/manager/ssl/CertBlocklist.cpp @@ +439,3 @@ > // Write issuer data to the output stream > PLDHashOperator > WriteIssuer(nsCStringHashKey* aHashKey, void* aUserArg) and what about saveInfo.issuers.EnumerateEntries(WriteIssuer, &saveInfo); ?
Attachment #8635853 -
Flags: review?(honzab.moz) → review-
Comment 7•9 years ago
|
||
Oh god... you split that to 5 patches... Please submit one patch when you modify just a single file...
Updated•9 years ago
|
Attachment #8635854 -
Flags: review?(honzab.moz)
Updated•9 years ago
|
Attachment #8635855 -
Flags: review?(honzab.moz)
Updated•9 years ago
|
Attachment #8635856 -
Flags: review?(honzab.moz)
Comment 8•9 years ago
|
||
Comment on attachment 8635853 [details] [diff] [review] (part 1) - Use nsTHashtable::Iterator in CertBlockList Review of attachment 8635853 [details] [diff] [review]: ----------------------------------------------------------------- OK, I'll walk the split patches, but it's pretty confusing..
Attachment #8635853 -
Flags: review- → review+
Comment 9•9 years ago
|
||
Comment on attachment 8635857 [details] [diff] [review] (part 5) - Use nsTHashtable::Iterator in nsCertOverrideService Review of attachment 8635857 [details] [diff] [review]: ----------------------------------------------------------------- ::: security/manager/ssl/nsCertOverrideService.cpp @@ +168,5 @@ > { > + ReentrantMonitorAutoEnter lock(monitor); > + for (auto iter = mSettingsTable.Iter(); !iter.Done(); iter.Next()) { > + nsCertOverrideEntry *entry = iter.Get(); > + if (entry->mSettings.mIsTemporary) { I think you still need to check !entry ? or there always is a entry? maybe the check in the old code is just a precaution that never failed @@ +589,5 @@ > { > ReentrantMonitorAutoEnter lock(monitor); > uint32_t overrideCount = 0; > + for (auto iter = mSettingsTable.Iter(); !iter.Done(); iter.Next()) { > + if (!iter.Get()->mSettings.mIsTemporary) { same here?
Attachment #8635857 -
Flags: review?(honzab.moz) → review+
Updated•9 years ago
|
Attachment #8635854 -
Flags: review+
Updated•9 years ago
|
Attachment #8635855 -
Flags: review+
Updated•9 years ago
|
Attachment #8635856 -
Flags: review+
Assignee | ||
Comment 10•9 years ago
|
||
> ::: security/manager/ssl/nsCertOverrideService.cpp
> @@ +168,5 @@
> > {
> > + ReentrantMonitorAutoEnter lock(monitor);
> > + for (auto iter = mSettingsTable.Iter(); !iter.Done(); iter.Next()) {
> > + nsCertOverrideEntry *entry = iter.Get();
> > + if (entry->mSettings.mIsTemporary) {
>
> I think you still need to check !entry ? or there always is a entry? maybe
> the check in the old code is just a precaution that never failed
iter.Get() never returns nullptr, and the check was unnecessary with the old code as well.
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0e9c46f6bd26 https://hg.mozilla.org/integration/mozilla-inbound/rev/c05735a106ce https://hg.mozilla.org/integration/mozilla-inbound/rev/06466d6c7a6f https://hg.mozilla.org/integration/mozilla-inbound/rev/4a6c0871edf7 https://hg.mozilla.org/integration/mozilla-inbound/rev/30f211278f31
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0e9c46f6bd26 https://hg.mozilla.org/mozilla-central/rev/c05735a106ce https://hg.mozilla.org/mozilla-central/rev/06466d6c7a6f https://hg.mozilla.org/mozilla-central/rev/4a6c0871edf7 https://hg.mozilla.org/mozilla-central/rev/30f211278f31
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•