Closed
Bug 1632099
Opened 5 years ago
Closed 5 years ago
do_QueryObject should work with const smart pointer
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla79
| Tracking | Status | |
|---|---|---|
| firefox79 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
Details
Attachments
(2 files)
Right now, you can't do something like:
const nsCOMPtr<nsISupports> foo;
RefPtr<nsIInterface> blah = do_QueryObject(foo);
you must do:
RefPtr<nsIInterface> blah = do_QueryObject(foo.get());
no reason it couldn't be made to work.
It prevents converting easily methods that should have been declared as const.
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
Depends on D80385
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a52ccc23e4e
P1. Have nsQueryObject accept const smart pointers. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/15b83c404664
P2. Remove work around issue fixed in P1. r=froydnj
Comment 4•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/2a52ccc23e4e
https://hg.mozilla.org/mozilla-central/rev/15b83c404664
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox79:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in
before you can comment on or make changes to this bug.
Description
•