Title: [200561] trunk/Source/WebCore
Revision
200561
Author
[email protected]
Date
2016-05-08 12:11:03 -0700 (Sun, 08 May 2016)

Log Message

Roll out: ThreadSanitizer: Data race and thread leak in WebCore::ScrollingThread::createThreadIfNeeded
<https://webkit.org/b/157462>

This reverts commit r200554.

This doesn't fix the data race, and the thread leak is a
separate issue.

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::createThreadIfNeeded): Roll out the
change.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (200560 => 200561)


--- trunk/Source/WebCore/ChangeLog	2016-05-08 19:05:25 UTC (rev 200560)
+++ trunk/Source/WebCore/ChangeLog	2016-05-08 19:11:03 UTC (rev 200561)
@@ -1,3 +1,17 @@
+2016-05-08  David Kilzer  <[email protected]>
+
+        Roll out: ThreadSanitizer: Data race and thread leak in WebCore::ScrollingThread::createThreadIfNeeded
+        <https://webkit.org/b/157462>
+
+        This reverts commit r200554.
+
+        This doesn't fix the data race, and the thread leak is a
+        separate issue.
+
+        * page/scrolling/ScrollingThread.cpp:
+        (WebCore::ScrollingThread::createThreadIfNeeded): Roll out the
+        change.
+
 2016-05-08  Darin Adler  <[email protected]>
 
         Follow-up to that last patch (missed review comments).

Modified: trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp (200560 => 200561)


--- trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp	2016-05-08 19:05:25 UTC (rev 200560)
+++ trunk/Source/WebCore/page/scrolling/ScrollingThread.cpp	2016-05-08 19:11:03 UTC (rev 200561)
@@ -74,21 +74,19 @@
 
 void ScrollingThread::createThreadIfNeeded()
 {
-    static std::once_flag onceFlag;
-    std::call_once(onceFlag, [&] {
-        // Wait for the thread to initialize the run loop.
-        {
-            std::unique_lock<Lock> lock(m_initializeRunLoopMutex);
+    if (m_threadIdentifier)
+        return;
 
-            m_threadIdentifier = createThread(threadCallback, this, "WebCore: Scrolling");
+    // Wait for the thread to initialize the run loop.
+    {
+        std::unique_lock<Lock> lock(m_initializeRunLoopMutex);
+
+        m_threadIdentifier = createThread(threadCallback, this, "WebCore: Scrolling");
         
 #if PLATFORM(COCOA)
-            m_initializeRunLoopConditionVariable.wait(lock, [this] {
-                return m_threadRunLoop;
-            });
+        m_initializeRunLoopConditionVariable.wait(lock, [this]{ return m_threadRunLoop; });
 #endif
-        }
-    });
+    }
 }
 
 void ScrollingThread::threadCallback(void* scrollingThread)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to