Closed
Bug 1340845
Opened 7 years ago
Closed 7 years ago
convert nsIArray.QueryElementAt() to do_QueryElementAt() in mailnews
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aceman, Assigned: aceman)
References
Details
Attachments
(1 file)
35.12 KB,
patch
|
rkent
:
review+
|
Details | Diff | Splinter Review |
Convert some nsIArray.QueryElementAt() occurrences to do_QueryElementAt() in mailnews C++ code. The new helper is shorter and retrieves the interface class automatically. The pattern: - nsCOMPtr<nsIMsgSearchTerm> term; - nsresult rv = m_termList->QueryElementAt(termIndex, NS_GET_IID(nsIMsgSearchTerm), - (void **)getter_AddRefs(term)); + nsresult rv; + nsCOMPtr<nsIMsgSearchTerm> term = do_QueryElementAt(m_termList, termIndex, &rv);
Try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=64048ed3fa1fbaeaf1ee5820f64311f05c9b14f2
Attachment #8838903 -
Flags: review?(rkent)
Comment 2•7 years ago
|
||
Comment on attachment 8838903 [details] [diff] [review] patch Review of attachment 8838903 [details] [diff] [review]: ----------------------------------------------------------------- LGTM
Attachment #8838903 -
Flags: review?(rkent) → review+
Thanks.
Keywords: checkin-needed
Whiteboard: [apply on top of bug 1340835]
Comment 4•7 years ago
|
||
https://hg.mozilla.org/comm-central/rev/56f686a5c3c0da25c08d6542149bbe66eafca5c3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [apply on top of bug 1340835]
Comment 5•7 years ago
|
||
Just for the record: https://hg.mozilla.org/comm-central/rev/56f686a5c3c0da25c08d6542149bbe66eafca5c3#l17.12 - nsCOMPtr<nsINntpIncomingServer> nntpServer; - rv = server->QueryInterface(NS_GET_IID(nsINntpIncomingServer), - getter_AddRefs(nntpServer)); + nsCOMPtr<nsINntpIncomingServer> nntpServer = do_QueryInterface(server, &rv); There are heaps more just like this one: http://searchfox.org/comm-central/search?q=-%3EQueryInterface&case=false®exp=false&path= for example http://searchfox.org/comm-central/source/mailnews/compose/src/nsMsgComposeService.cpp#958 Care to do another clean-up run?
You need to log in
before you can comment on or make changes to this bug.
Description
•