Closed
Bug 1029180
Opened 11 years ago
Closed 11 years ago
Remove dangerous public destructor of nsStyleContext
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(1 file)
2.39 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
Noticed that nsStyleContext (which provides its own AddRef() / Release() methods) has a public destructor.
We should make its destructor private, to prevent ourselves from accidentally instantiating it outside of a nsRefPtr, per
https://groups.google.com/d/msg/mozilla.dev.platform/jMDAQtBzdCA/_c8tpG6TnFoJ
and related bugs. (bug 984786, bug 1027251)
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8444751 -
Flags: review?(cam)
Updated•11 years ago
|
Attachment #8444751 -
Flags: review?(cam) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Flags: in-testsuite-
Comment 3•11 years ago
|
||
To make this less likely to regress accidentally, you could use MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING. It is currently only used internally in nsISupportsImpl.h but it's OK to start relying on it. We have to expose it anyway, as far as my understanding of the C preprocessor goes.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•