Closed Bug 545730 Opened 14 years ago Closed 14 years ago

make CallQueryInterface variant for nsRefPtr

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: surkov, Assigned: neil)

Details

Attachments

(1 file, 1 obsolete file)

spun off the bug 545391. It should be possible to pass nsRefPtr as the first argument into CallQueryInterface.
Attached patch patch (obsolete) — Splinter Review
Attached patch With testSplinter Review
I also added a test for CallQueryInterface with an nsCOMPtr.

(The tests are never actually executed, they are compile-time checks only.)
Assignee: nobody → neil
Attachment #426565 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #426571 - Flags: review?(dbaron)
Comment on attachment 426571 [details] [diff] [review]
With test

r=dbaron, although I wonder if we'd be better off changing the main CallQueryInterface from requiring a T* to requiring a T, so that we can just templatize on nsIFoo* or nsRefPtr<nsIFoo> and then rely on the operator->.
Attachment #426571 - Flags: review?(dbaron) → review+
Pushed changeset 6710e573583d to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Thanks for fixing this!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: