Remove outdated comment about deriving nsIInterfaceRequestor first
Categories
(Core :: Networking, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: manuel, Assigned: u711051, Mentored)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Bug 1782536 - Remove outdated comments from HttpChannelParent.h and ParentChannelListener.h r=#necko
48 bytes,
text/x-phabricator-request
|
Details | Review |
Outdated comments:
- https://searchfox.org/mozilla-central/rev/7b9d23ece4835bf355e5195f30fef942d376a1c7/netwerk/protocol/http/HttpChannelParent.h#45-47
- https://searchfox.org/mozilla-central/rev/7b9d23ece4835bf355e5195f30fef942d376a1c7/netwerk/protocol/http/ParentChannelListener.h#29-31
From discussion on matrix:
manuel:
There is a note in
HttpChannelParent
andParentChannelListener
, thatnsIInterfaceRequestor
has to be the first derived class:Note: nsIInterfaceRequestor must be the first base so that do_QueryObject()
works correctly on this object, as it's needed to compute a void* pointing to
the beginning of this object. [1][2]But other classes like
nsDocShellTreeOwner
[3] don't derivensIInterfaceRequestor
as their first base. Is the comment obsolete, specific toHttpChannelParent
or should the other classes also derivensIInterfaceRequestor
as their first base? I coundn't find a comment innsIInterfaceRequestor.idl
[4] stating such a requirement.
valentin:
I think that comment comes from this: https://bugzilla.mozilla.org/page.cgi?id=splinter.html&ignore=&bug=1219469&attachment=8703054
if (aIID.Equals(NS_GET_IID(HttpChannelParentListener))) { foundInterface = static_cast<nsIInterfaceRequestor*>(this); } else
So it used to be that it got the queryObject pointer by casting to nsIInterfaceRequestor - that's no longer the case, so we can probably remove that comment. Feel free to file a bug for it.
Assigning to Sunil as a good first bug.
Thank you for the report, Manuel.
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/47dbad9f3ace Remove outdated comments from HttpChannelParent.h and ParentChannelListener.h r=necko-reviewers,valentin DONTBUILD
Comment 4•2 years ago
|
||
bugherder |
Description
•