Shrink EventTargetData by making firingEventListeners vector optional.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2012 17:46:36 +0000 (17:46 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2012 17:46:36 +0000 (17:46 +0000)
commitb3ef36d3755ace5bcb230d45a049c1db038ed677
treeec9fea71e5b870df88e1c5157973112210a3108a
parent5b4826aed0bba605b5c31cdbe795c322a3c574fa
Shrink EventTargetData by making firingEventListeners vector optional.
<http://webkit.org/b/99532>
<rdar://problem/12515099>

Reviewed by Anders Carlsson.

The majority of event listeners never actually fire, and EventTargetData::firingEventListeners
is just sitting there taking up space. Make it an OwnPtr instead, shrinking EventTargetData
by 48 bytes and progressing Membuster3 by 395kB.

* dom/EventTarget.cpp:
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::fireEventListeners):
(WebCore::EventTarget::removeAllEventListeners):
* dom/EventTarget.h:
(WebCore::EventTarget::isFiringEventListeners):

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