Closed
Bug 186729
Opened 22 years ago
Closed 17 years ago
mailbox service NewURI should use callqueryinterface
Categories
(MailNews Core :: Networking, enhancement)
MailNews Core
Networking
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9
People
(Reporter: timeless, Assigned: Bienvenu)
References
()
Details
Attachments
(1 file, 4 obsolete files)
3.97 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
from reading the netwerk impls, it looks like this could use CallQueryInterface.
Attachment #110933 -
Attachment is obsolete: true
Comment 3•22 years ago
|
||
Comment on attachment 111143 [details] [diff] [review]
fix tabs, early returns, correct PR_...free calls,
requesting review on behalf of timeless
Attachment #111143 -
Flags: review?(dmose)
Comment on attachment 111143 [details] [diff] [review]
fix tabs, early returns, correct PR_...free calls,
whatever conflicts may exist are resolved in my tree at home. i'm traveling
until mid january, please review based on the changes in the patch, i'll
address any concerns before i commit.
Attachment #111143 -
Flags: review?(dmose) → review?(bienvenu)
Updated•20 years ago
|
Product: MailNews → Core
Assignee | ||
Comment 5•17 years ago
|
||
From my reading of the code, we need to check both the source and dest of CallQueryInterface parameters, because it only does null checks in debug mode
Assignee: timeless → bienvenu
Attachment #111143 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #321265 -
Flags: superreview?(neil)
Attachment #111143 -
Flags: review?(bienvenu)
Comment 6•17 years ago
|
||
Comment on attachment 321265 [details] [diff] [review]
salvage unbitrotted parts of patch
>- if (NS_SUCCEEDED(rv) && mailboxurl)
>+ if (NS_SUCCEEDED(rv) && aURL)
I think you still want to null-check mailboxurl rather than aURL - aURL is contracted not to be null (although I think QueryInterface checks anyway).
>- rv = mailboxurl->QueryInterface(NS_GET_IID(nsIURI), (void **) aURL);
>+ CallQueryInterface(mailboxurl, aURL);
Isn't this supposed to have rv = ?
Assignee | ||
Comment 7•17 years ago
|
||
you're right about rv, and needing to check mailboxurl. But I think QueryInterface doesn't check the output parameter (it asserts, but I think in release mode it would crash), so I added an NS_ENSURE_ARG_POINTER
Attachment #321265 -
Attachment is obsolete: true
Attachment #321516 -
Flags: superreview?(neil)
Attachment #321265 -
Flags: superreview?(neil)
Comment 8•17 years ago
|
||
Comment on attachment 321516 [details] [diff] [review]
patch addressing comments
>+ nsCAutoString temp = NS_LITERAL_CSTRING("mailbox://") + buf;
I don't think this is external API safe... might want to do this separately?
>+ if (mailboxurl && aURL)
> if (aURL && mailboxurl)
>+ if (aURL && mailboxurl)
Some consistency would look nice ;-)
Attachment #321516 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 9•17 years ago
|
||
I went ahead and tweaked the string stuff so that it should work with external linkage, and made the if aURL and mailboxurl checks consistent. Carrying forward the review flags...
Attachment #321516 -
Attachment is obsolete: true
Attachment #322149 -
Flags: superreview+
Attachment #322149 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
OS: Windows 2000 → All
QA Contact: grylchan → mailnews.networking
Hardware: PC → All
Target Milestone: --- → mozilla1.9
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•