Closed
Bug 1155387
Opened 10 years ago
Closed 10 years ago
Call to SetData(imageContainer) triggers build error: "ContentParent.cpp:2616:30: error: no viable conversion from 'nsCOMPtr<imgIContainer>' to 'nsISupports *' "
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
| Tracking | Status | |
|---|---|---|
| firefox40 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 file)
|
866 bytes,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
dom/ipc/ContentParent.cpp:2616:30: error: no viable conversion from 'nsCOMPtr<imgIContainer>' to 'nsISupports *'
rv = imgPtr->SetData(imageContainer);
^~~~~~~~~~~~~~
../../dist/include/nsCOMPtr.h:693:3: note: candidate function
operator T*() const { return get(); }
^
../../dist/include/nsISupportsPrimitives.h:1613:35: note: passing argument to parameter 'aData' here
NS_IMETHOD SetData(nsISupports *aData) = 0;
^
}
This line of code was added in bug 1071562 part 1:
https://hg.mozilla.org/integration/mozilla-inbound/rev/802512ee57ae#l6.139
Comment 1•10 years ago
|
||
Just need a QI or a cast or something. Doesn't happen on our default compilers though.
| Assignee | ||
Comment 2•10 years ago
|
||
That's what I thought, but that's not quite it.
I thought replacing "imageContainer" with "imageContainer.get()" might fix it, but then I get:
> error: cannot initialize a parameter of type 'nsISupports *' with an rvalue of type 'imgIContainer *'
I also tried static_cast<nsISupports*>(imageContainer.get()), but that gives me this error about the static_cast:
> error: static_cast from 'imgIContainer *' to 'nsISupports *', which are not related by inheritance, is not allowed
This was pretty mysterious, until I realized that we just were missing the imgIContainer header-file. (The compiler errors could stand to be more helpful about that.)
| Assignee | ||
Comment 3•10 years ago
|
||
I suspect our TreeHerder compilers aren't hitting this due to some luck of unified builds, or perhaps due to getting this #include via some #ifdeffed section somewhere, due to having a different build configuration from mine.
Updated•10 years ago
|
Attachment #8593595 -
Flags: review?(enndeakin) → review+
Comment 5•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•