Closed
Bug 345123
Opened 18 years ago
Closed 10 years ago
Why does class nsGetterAddRefs<T> have an nsISupports**() operator anyway?
Categories
(Core :: XPCOM, defect, P5)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: neil, Assigned: khuey)
References
Details
Attachments
(1 file)
39.90 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
Spun off from bug 344949 comment 7. Bug 344949 was caused by the following code snippet: nsCOMPtr<nsIXULTemplateResult> nextresult; rv = results->GetNext(getter_AddRefs(nextresult)); GetNext takes an nsISupports** so this construct reinterpreted the return value as an nsIXULTemplateResult. This was not noticed at the time because a) the code compiles (which is this bug) and b) it was only tested using an enumerator that enumerated objects whose nsISupports pointer was statically cast from their nsIXULTemplateResult pointer.
Comment 1•18 years ago
|
||
(In reply to comment #0) > Spun off from bug 344949 comment 7. I think you mean bug 344939 comment 7 :)
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Assignee | ||
Comment 2•11 years ago
|
||
Yeah, this operator nsISupports** is crazy.
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 820770 [details] [diff] [review] Patch There are a lot of calls to ReadObject there. Maybe we should change the signature to void readObject(in boolean aIsStrongRef, in nsIIDRef uuid, [retval, iid_is(uuid)] out nsQIResult object);
Assignee | ||
Comment 4•11 years ago
|
||
Perhaps. I'd prefer to do that elsewhere though.
Updated•11 years ago
|
Attachment #820770 -
Flags: review?(benjamin) → review+
Comment 5•11 years ago
|
||
This looks great, but I don't understand why you're commenting the method out instead of removing it.
Assignee | ||
Comment 6•11 years ago
|
||
Oh, yeah, that's silly. I'll actually remove it when I land.
Comment 7•11 years ago
|
||
(In reply to comment #6) > Oh, yeah, that's silly. I'll actually remove it when I land. You rock!
Assignee | ||
Comment 9•10 years ago
|
||
Because I forgot about it. I'll land it next time I push.
Flags: needinfo?(khuey)
Assignee | ||
Comment 10•10 years ago
|
||
Needed some rebasing. https://hg.mozilla.org/integration/mozilla-inbound/rev/1123c64bca9e
Assignee | ||
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1123c64bca9e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Assignee | ||
Comment 12•10 years ago
|
||
And an attempt to make comm-central build: https://hg.mozilla.org/comm-central/rev/e67da9f094ff
You need to log in
before you can comment on or make changes to this bug.
Description
•