TestWebKitAPI: initialize the main thread before running tests
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 16:41:07 +0000 (16:41 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 16:41:07 +0000 (16:41 +0000)
<http://webkit.org/b/75064>

Reviewed by Adam Roben.

* TestWebKitAPI/TestsController.cpp:
(TestWebKitAPI::TestsController::TestsController): Call
WTF::initializeMainThread() to prevent assertions in Debug
builds.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103546 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/TestsController.cpp

index 3f37ca6efe5a116f3c4fba0478dbce985d7fbb8b..d94dbcfc1200f0d70fc37c8f19fa3cccb2a520f0 100644 (file)
@@ -1,3 +1,15 @@
+2011-12-22  David Kilzer  <ddkilzer@apple.com>
+
+        TestWebKitAPI: initialize the main thread before running tests
+        <http://webkit.org/b/75064>
+
+        Reviewed by Adam Roben.
+
+        * TestWebKitAPI/TestsController.cpp:
+        (TestWebKitAPI::TestsController::TestsController): Call
+        WTF::initializeMainThread() to prevent assertions in Debug
+        builds.
+
 2011-12-22  David Kilzer  <ddkilzer@apple.com>
 
         run-api-tests: dumpAllTests() should not use global variables
 2011-12-22  David Kilzer  <ddkilzer@apple.com>
 
         run-api-tests: dumpAllTests() should not use global variables
index 29dcc714e3e2acca0ef2c3d83adfc8f04d564cf1..955838fb9d39815def83190aba1c853fb6ae3b27 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "TestsController.h"
 
 #include "config.h"
 #include "TestsController.h"
 
+#include <wtf/MainThread.h>
 #include <wtf/Threading.h>
 
 namespace TestWebKitAPI {
 #include <wtf/Threading.h>
 
 namespace TestWebKitAPI {
@@ -38,6 +39,8 @@ TestsController& TestsController::shared()
 
 TestsController::TestsController()
 {
 
 TestsController::TestsController()
 {
+    WTF::initializeMainThread();
+
     // FIXME: We currently initialize threading here to avoid assertion failures from
     // the ThreadRestrictionVerifier - https://bugs.webkit.org/show_bug.cgi?id=66112
     // We should make sure that all objects tested either initialize threading or inherit from
     // FIXME: We currently initialize threading here to avoid assertion failures from
     // the ThreadRestrictionVerifier - https://bugs.webkit.org/show_bug.cgi?id=66112
     // We should make sure that all objects tested either initialize threading or inherit from