Closed Bug 1034918 Opened 10 years ago Closed 10 years ago

Remove dangerous public destructor of nsHttpTransaction

Categories

(Core :: Networking, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: bjacob, Assigned: mcmanus)

References

Details

Attachments

(1 file)

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
Attachment #8451652 - Flags: review?(sworkman)
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
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+
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 || \ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sorry about the inconvenience!
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.

Attachment

General

Created:
Updated:
Size: