Closed
Bug 1034918
Opened 10 years ago
Closed 10 years ago
Remove dangerous public destructor of nsHttpTransaction
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bjacob, Assigned: mcmanus)
References
Details
Attachments
(1 file)
(deleted),
patch
|
sworkman
:
review+
|
Details | Diff | Splinter Review |
In bug 1028588 we removed dangerous public destructors of XPCOM-refcounted classes outside of a finite whitelist, see HasDangerousPublicDestructor. Now we are going over the entries in this whitelist.
One of them is: nsHttpTransaction
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8451652 -
Flags: review?(sworkman)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
Comment 3•10 years ago
|
||
Comment on attachment 8451652 [details] [diff] [review]
nshttptransaction dtor can be private
Review of attachment 8451652 [details] [diff] [review]:
-----------------------------------------------------------------
One question, otherwise r=me.
::: netwerk/protocol/http/nsHttpTransaction.h
@@ +63,5 @@
> NS_DECL_NSIINPUTSTREAMCALLBACK
> NS_DECL_NSIOUTPUTSTREAMCALLBACK
>
> nsHttpTransaction();
> +public:
Do you need this?
Attachment #8451652 -
Flags: review?(sworkman) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
backed out remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/d76669861f43
Assignee | ||
Comment 6•10 years ago
|
||
1028588 landed an assert change after the try run that broke this. needs a minor tweak to remove the whitelist.
/builds/slave/m-in-osx64_g-00000000000000000/build/netwerk/protocol/http/nsHttpTransaction.cpp:1812:1: error: static_assert failed "Class nsHttpTransaction has no public destructor. That's good! So please remove the HasDangerousPublicDestructor specialization for it."
NS_IMPL_ADDREF(nsHttpTransaction)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../dist/include/nsISupportsImpl.h:559:3: note: expanded from macro 'NS_IMPL_ADDREF'
MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(_class) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../dist/include/nsISupportsImpl.h:97:3: note: expanded from macro 'MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING'
static_assert(!mozilla::HasDangerousPublicDestructor<X>::value || \
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reporter | ||
Comment 7•10 years ago
|
||
Sorry about the inconvenience!
Assignee | ||
Comment 8•10 years ago
|
||
pushed again with the portion of 1028588 that added the assert specifically about this code backed out
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/ea72e2c9debe
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•