Closed Bug 1493791 Opened 7 years ago Closed 7 years ago

Fix trivial calls to do_QueryInterface in XPCOM unit tests

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

No description provided.
In TestEventTargetQI.cpp, nsISerialEventTarget is a subtype of nsIThreadPool, so we cannot QI from the latter to the former once trivial QIs are banned. However, we still want to check if a QI to nsISerialEventTarget does something, so I added an intermediate cast up to nsISupports, and then QI from there. I wrapped that all up in a templated function, because the code is a bit ugly, and used it everywhere for uniformity, even though it is not always needed. I fixed TestCOMPtr.cpp in the same way, by casting up to nsISupports.
Comment on attachment 9011970 [details] Bug 1493791 - Fix trivial calls to do_QueryInterface in XPCOM unit tests Nathan Froyd [:froydnj] has approved the revision.
Attachment #9011970 - Flags: review+
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fea096dd49df Fix trivial calls to do_QueryInterface in XPCOM unit tests r=froydnj
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: