Closed
Bug 1049075
Opened 10 years ago
Closed 10 years ago
remove virtual from methods of nsGridCell
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: tbsaunde, Assigned: dholbert)
Details
Attachments
(1 file)
1.35 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
This class doesn't inherit from anything, so I don't see a good reason for it to have virtual methods.
Assignee | ||
Comment 1•10 years ago
|
||
(To be clear, it looks like this is XUL grid, not CSS grid -- http://mxr.mozilla.org/mozilla-central/source/layout/xul/grid/nsGridCell.h .) Indeed, this class doesn't inherit, nor does anything inherit from it. So, no point in 'virtual'. The only virtual method I see is the destructor. We should also mark the class MOZ_FINAL, to verify that we're actually correct in thinking that nothing inherits from it. (and in the unlikely scenario that anyone adds a child class, they'll have to remove that annotation and hopefully will notice that they should re-virtualize the destructor.)
Assignee | ||
Comment 2•10 years ago
|
||
Trevor, were you intending to take this? If so, excellent! If not, I may take it or mark it as a mentored bug.
Flags: needinfo?(trev.saunders)
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #2) > Trevor, were you intending to take this? If so, excellent! If not, I may > take it or mark it as a mentored bug. nah, was just filing follow ups for bug 1047696, feel free to find someone to fix it.
Flags: needinfo?(trev.saunders)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(dholbert)
Assignee | ||
Comment 4•10 years ago
|
||
(I ended up opting to write the patch myself; I tend to think this isn't substantial enough or exciting enough to make for a particularly good mentored bug.) 3 changes: - drop 'virtual' from destructor - Add MOZ_FINAL to make sure that dropping 'virtual' is safe - Add #include for Attributes.h, which provides MOZ_FINAL
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8470241 -
Flags: review?(tnikkel)
Flags: needinfo?(dholbert)
Updated•10 years ago
|
Attachment #8470241 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d8b1d2b3e762
Flags: in-testsuite-
Assignee | ||
Updated•10 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d8b1d2b3e762
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•