Changeset 112340 in webkit


Ignore:
Timestamp:
Mar 27, 2012 5:21:13 PM (12 years ago)
Author:
andersca@apple.com
Message:

Fix race condition when initializing the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=82398
<rdar://problem/11002166>

Reviewed by Sam Weinig.

Lock m_initializeRunLoopConditionMutex when assigning m_threadIdentifier since we're
asserting that it's not null in the scrolling thread.

  • page/scrolling/ScrollingThread.cpp:

(WebCore::ScrollingThread::createThreadIfNeeded):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112336 r112340  
     12012-03-27  Anders Carlsson  <andersca@apple.com>
     2
     3        Fix race condition when initializing the scrolling thread
     4        https://bugs.webkit.org/show_bug.cgi?id=82398
     5        <rdar://problem/11002166>
     6
     7        Reviewed by Sam Weinig.
     8
     9        Lock m_initializeRunLoopConditionMutex when assigning m_threadIdentifier since we're
     10        asserting that it's not null in the scrolling thread.
     11
     12        * page/scrolling/ScrollingThread.cpp:
     13        (WebCore::ScrollingThread::createThreadIfNeeded):
     14
    1152012-03-27  Luke Macpherson  <macpherson@chromium.org>
    216
  • trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp

    r108925 r112340  
    6767        return;
    6868
    69     m_threadIdentifier = createThread(threadCallback, this, "WebCore: Scrolling");
    70 
    7169    // Wait for the thread to initialize the run loop.
    7270    {
    7371        MutexLocker locker(m_initializeRunLoopConditionMutex);
     72
     73        m_threadIdentifier = createThread(threadCallback, this, "WebCore: Scrolling");
     74       
    7475#if PLATFORM(MAC)
    7576        while (!m_threadRunLoop)
Note: See TracChangeset for help on using the changeset viewer.