Closed
Bug 1029137
Opened 10 years ago
Closed 10 years ago
Remove dangerous public destructor of nsComputedDOMStyle
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bjacob, Assigned: mccr8)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bzbarsky
:
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: nsComputedDOMStyle
![]() |
||
Comment 1•10 years ago
|
||
Anuj, does this bug look like something you'd be interested in?
Flags: needinfo?(anujagarwal464)
Assignee | ||
Comment 2•10 years ago
|
||
Where is the destructor called? Bug 1029157 will at least fix the uses of the public destructor in the nsComputedDOMStyle.cpp itself. That needs some perf testing.
Depends on: 1029157
Assignee | ||
Comment 3•10 years ago
|
||
I'll just do this. Sorry Anuj that I keep taking your bugs, I'm just on a big cleanup pass of this style code. :)
Assignee: nobody → continuation
Flags: needinfo?(anujagarwal464)
Assignee | ||
Comment 4•10 years ago
|
||
try run: https://tbpl.mozilla.org/?tree=Try&rev=ff1ece740d55
Attachment #8446042 -
Flags: review?(bzbarsky)
![]() |
||
Comment 5•10 years ago
|
||
Comment on attachment 8446042 [details] [diff] [review] Make the destructor of nsComputedDOMStyle private. r=me
Attachment #8446042 -
Flags: review?(bzbarsky) → review+
Comment 6•10 years ago
|
||
Comment on attachment 8446042 [details] [diff] [review] Make the destructor of nsComputedDOMStyle private. >+++ b/layout/style/nsComputedDOMStyle.h >- virtual ~nsComputedDOMStyle(); [...] > private: >+ virtual ~nsComputedDOMStyle(); >+ Incidentally, do we know of any reason this needs to be virtual? (particularly now that we're Pretty Sure that the only thing deleting our instances should be our own ::Release method, which know our exact type.) (We inherit from nsDOMCSSDeclaration, which has a (empty) virtual destructor, so to de-virtualize, we'd need to remove the annotation there as well.)
Assignee | ||
Comment 7•10 years ago
|
||
> Incidentally, do we know of any reason this needs to be virtual? Yeah, I noticed that, but I didn't want to unravel that sweater... https://hg.mozilla.org/integration/mozilla-inbound/rev/5b42688bc9e9
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5b42688bc9e9
Status: NEW → 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
•