Closed Bug 682744 Opened 8 years ago Closed 8 years ago

Sprinkle some do_QueryObject fairy dust around the tree

Categories

(Core :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: khuey, Assigned: marco)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Back in the days before do_QueryObject, you had to write:

nsCOMPtr<nsIFoo> = do_QueryInterface(static_cast<nsIBar>(someVariableOfAConcreteType));

These days, you can just write:

nsCOMPtr<nsIFoo> = do_QueryObject(someVariableOfAConcreteType);

The MXR query shows some usages that haven't been converted, and I'm pretty sure all of them can be converted.
Assignee: nobody → mar.castelluccio
Attached patch First patch (obsolete) — Splinter Review
Attachment #556621 - Flags: review?(khuey)
would be nice if you collapsed the lines that are now under 80 characters long ...
Attached patch First patch v2Splinter Review
Collapsed the lines ;)
Attachment #556621 - Attachment is obsolete: true
Attachment #556621 - Flags: review?(khuey)
Attachment #556738 - Flags: review?(khuey)
In my queue :-)
Status: NEW → ASSIGNED
Keywords: checkin-needed
Version: 8 Branch → Trunk
Flags: in-testsuite-
Target Milestone: --- → mozilla9
http://hg.mozilla.org/mozilla-central/rev/31b7b26ff4f9
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.