Changeset 141280 in webkit


Ignore:
Timestamp:
Jan 30, 2013 9:55:48 AM (11 years ago)
Author:
fmalita@chromium.org
Message:

Do not restart the matched properties cache timer if active
https://bugs.webkit.org/show_bug.cgi?id=108345

Reviewed by Andreas Kling.

StyleResolver::addToMatchedPropertiesCache() keeps resetting the timer as more than
matchedDeclarationCacheAdditionsBetweenSweeps entries are added. When armed, we should let
the timer expire at its scheduled time - otherwise it may never get a chance to fire if
entries keep getting added.

No new tests. This is a long lived timer (1min) which makes testing impractical.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::addToMatchedPropertiesCache):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141278 r141280  
     12013-01-30  Florin Malita  <fmalita@chromium.org>
     2
     3        Do not restart the matched properties cache timer if active
     4        https://bugs.webkit.org/show_bug.cgi?id=108345
     5
     6        Reviewed by Andreas Kling.
     7
     8        StyleResolver::addToMatchedPropertiesCache() keeps resetting the timer as more than
     9        matchedDeclarationCacheAdditionsBetweenSweeps entries are added. When armed, we should let
     10        the timer expire at its scheduled time - otherwise it may never get a chance to fire if
     11        entries keep getting added.
     12
     13        No new tests. This is a long lived timer (1min) which makes testing impractical.
     14
     15        * css/StyleResolver.cpp:
     16        (WebCore::StyleResolver::addToMatchedPropertiesCache):
     17
    1182013-01-30  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r141093 r141280  
    24732473{
    24742474    static const unsigned matchedDeclarationCacheAdditionsBetweenSweeps = 100;
    2475     if (++m_matchedPropertiesCacheAdditionsSinceLastSweep >= matchedDeclarationCacheAdditionsBetweenSweeps) {
     2475    if (++m_matchedPropertiesCacheAdditionsSinceLastSweep >= matchedDeclarationCacheAdditionsBetweenSweeps
     2476        && !m_matchedPropertiesCacheSweepTimer.isActive()) {
    24762477        static const unsigned matchedDeclarationCacheSweepTimeInSeconds = 60;
    24772478        m_matchedPropertiesCacheSweepTimer.startOneShot(matchedDeclarationCacheSweepTimeInSeconds);
Note: See TracChangeset for help on using the changeset viewer.