NodeRareData doesn't need to have a vtable pointer
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 05:23:04 +0000 (05:23 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 05:23:04 +0000 (05:23 +0000)
commitd86421ed78e94696b6c2c05d7bc1e6d479eebe72
tree27a0818e4ca14165c91391fe4b0612e658444fc6
parent6552853f9bd8f07dc172f5bb39a254e4d38a8418
NodeRareData doesn't need to have a vtable pointer
https://bugs.webkit.org/show_bug.cgi?id=106965

Reviewed by Benjamin Poulain.

Made the destructor and reportMemoryUsage of NodeRareDataBase and NodeRareData
respectively and their subclasses non-virtual.

* dom/ElementRareData.cpp:
(SameSizeAsElementRareData): Added.
(WebCore): Added a compile assertion for the size of ElementRareData.
* dom/ElementRareData.h:
(ElementRareData):
* dom/Node.cpp:
(WebCore::Node::clearRareData): Explicitely delete NodeRareData or ElementRareData.
(WebCore::Node::reportMemoryUsage): Explicitely add NodeRareData or ElementRareData.
* dom/Node.h:
(NodeRareDataBase): Deleted the virtual destructor.
* dom/NodeRareData.cpp:
(SameSizeAsNodeRareData): Removed one pointer.
* dom/NodeRareData.h:
(NodeRareData): Removed the virtual destructor.
(NodeRareData::reportMemoryUsage): Made non-virtual.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ElementRareData.cpp
Source/WebCore/dom/ElementRareData.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/NodeRareData.cpp
Source/WebCore/dom/NodeRareData.h