Changeset 117214 in webkit


Ignore:
Timestamp:
May 15, 2012 9:07:52 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium] CCTimer::isActive() is incorrect inside tick callback
https://bugs.webkit.org/show_bug.cgi?id=86513

Source/WebCore:

This patch implements CCTimer::isActive() by clearing the task pointer
when the timer fires.

Patch by Tien-Ren Chen <trchen@chromium.org> on 2012-05-15
Reviewed by James Robinson.

No new tests. Existing tests updated accordingly.

  • platform/graphics/chromium/cc/CCTimer.cpp:

(WebCore::CCTimerTask::performTask):

  • rendering/RenderLayerBacking.cpp:

Source/WebKit/chromium:

Update test cases to verify CCTimer::isActive() values.

Patch by Tien-Ren Chen <trchen@chromium.org> on 2012-05-15
Reviewed by James Robinson.

  • tests/CCTimerTest.cpp:

(WebKitTests::TEST_F):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117211 r117214  
     12012-05-15  Tien-Ren Chen  <trchen@chromium.org>
     2
     3        [Chromium] CCTimer::isActive() is incorrect inside tick callback
     4        https://bugs.webkit.org/show_bug.cgi?id=86513
     5
     6        This patch implements CCTimer::isActive() by clearing the task pointer
     7        when the timer fires.
     8
     9        Reviewed by James Robinson.
     10
     11        No new tests. Existing tests updated accordingly.
     12
     13        * platform/graphics/chromium/cc/CCTimer.cpp:
     14        (WebCore::CCTimerTask::performTask):
     15        * rendering/RenderLayerBacking.cpp:
     16
    1172012-05-15  Kentaro Hara  <haraken@chromium.org>
    218
  • trunk/Source/WebCore/platform/graphics/chromium/cc/CCTimer.cpp

    r111308 r117214  
    5353    void performTask()
    5454    {
    55         if (!m_timer || !m_timer->m_client)
     55        if (!m_timer)
    5656            return;
    5757
    58         m_timer->m_client->onTimerFired();
     58        CCTimerClient* client = m_timer->m_client;
     59
     60        m_timer->stop();
     61        if (client)
     62            client->onTimerFired();
    5963    }
    6064
  • trunk/Source/WebKit/chromium/ChangeLog

    r117213 r117214  
     12012-05-15  Tien-Ren Chen  <trchen@chromium.org>
     2
     3        [Chromium] CCTimer::isActive() is incorrect inside tick callback
     4        https://bugs.webkit.org/show_bug.cgi?id=86513
     5
     6        Update test cases to verify CCTimer::isActive() values.
     7
     8        Reviewed by James Robinson.
     9
     10        * tests/CCTimerTest.cpp:
     11        (WebKitTests::TEST_F):
     12
    1132012-05-15  Sheriff Bot  <webkit.review.bot@gmail.com>
    214
  • trunk/Source/WebKit/chromium/tests/CCTimerTest.cpp

    r111308 r117214  
    5656    CCTimer timer(&m_thread, this);
    5757    timer.startOneShot(0.001);
    58 
     58    EXPECT_TRUE(timer.isActive());
    5959    m_thread.runPendingTask();
     60    EXPECT_FALSE(timer.isActive());
    6061    EXPECT_TRUE(m_flag);
    6162    EXPECT_FALSE(m_thread.hasPendingTask());
     
    6667    CCTimer timer(&m_thread, this);
    6768    timer.startOneShot(0.001);
     69    EXPECT_TRUE(timer.isActive());
    6870    timer.stop();
     71    EXPECT_FALSE(timer.isActive());
    6972
    7073    m_thread.runPendingTask();
Note: See TracChangeset for help on using the changeset viewer.