Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c2eedea2d5307cb97dfadde9f990ce1ab625d2f5
https://github.com/WebKit/WebKit/commit/c2eedea2d5307cb97dfadde9f990ce1ab625d2f5
Author: Ryosuke Niwa <[email protected]>
Date: 2024-02-04 (Sun, 04 Feb 2024)
Changed paths:
M Source/WebCore/platform/ThreadTimers.h
M Source/WebCore/platform/Timer.cpp
M Source/WebCore/platform/Timer.h
Log Message:
-----------
Every Timer objects wastes 7 bytes for padding
https://bugs.webkit.org/show_bug.cgi?id=268703
Reviewed by Darin Adler.
Use a CompactRefPtrTuple to avoid 7-byte padding at the end of each Timer
object.
Also use iso-heap for ThreadTimerHeapItem since this object historically had bad
memory management bugs.
* Source/WebCore/platform/ThreadTimers.h:
* Source/WebCore/platform/Timer.cpp:
(WebCore::TimerHeapLessThanFunction::compare):
(WebCore::SameSizeAsTimer::~SameSizeAsTimer):
(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::nextFireInterval const):
(WebCore::TimerBase::checkHeapIndex const):
(WebCore::TimerBase::heapDecreaseKey):
(WebCore::TimerBase::heapDelete):
(WebCore::TimerBase::heapDeleteMin):
(WebCore::TimerBase::heapInsert):
(WebCore::TimerBase::heapPop):
(WebCore::TimerBase::heapPopMin):
(WebCore::TimerBase::hasValidHeapPosition const):
(WebCore::TimerBase::updateHeapIfNeeded):
(WebCore::TimerBase::setNextFireTime):
* Source/WebCore/platform/Timer.h:
(WebCore::TimerBase::nextFireTime const):
(WebCore::TimerBase::hasReachedMaxNestingLevel const):
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::bitfields const):
(WebCore::TimerBase::setBitfields):
(WebCore::TimerBase::inHeap const):
(WebCore::TimerBase::stop):
(WebCore::TimerBase::setHasReachedMaxNestingLevel):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
(WebCore::DeferrableOneShotTimer::restart):
(WebCore::DeferrableOneShotTimer::stop):
(WebCore::DeferrableOneShotTimer::setShouldRestartWhenTimerFires):
Canonical link: https://commits.webkit.org/274077@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes