Closed Bug 469977 Opened 16 years ago Closed 16 years ago

Tidy up some of mailbox protocol handler and provide unit test

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b2

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Attached patch The fixSplinter Review
As part of the password manager work, I'm adding unit tests for each of the protocols we need to ensure they are working as I expect and don't regress.

This patch adds the appropriate test for the mailbox: protocol. It also does some tidy up in the protocol handler - missing checks and a few optimisations.
Attachment #353417 - Flags: superreview?(neil)
Attachment #353417 - Flags: review?(neil)
Attachment #353417 - Flags: superreview?(neil)
Attachment #353417 - Flags: superreview+
Attachment #353417 - Flags: review?(neil)
Attachment #353417 - Flags: review+
Comment on attachment 353417 [details] [diff] [review]
The fix

>-    NS_ADDREF(*_retval = aMsgUri);
>+    aMsgUri.swap(*_retval);
You can't swap with an uninitialised pointer (*_retval is not guaranteed to be initialised, although getter_AddRefs always passes in 0, so maybe you got lucky). Either clear it first or revert this change. r+sr=me with that fixed.
Patch checked in http://hg.mozilla.org/comm-central/rev/31f536c41354
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.