From 354e4414cd0485d82e95794d5a352f70bcc567ba Mon Sep 17 00:00:00 2001 From: "ddkilzer@apple.com" Date: Thu, 22 Dec 2011 16:41:07 +0000 Subject: [PATCH] TestWebKitAPI: initialize the main thread before running tests 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 | 12 ++++++++++++ Tools/TestWebKitAPI/TestsController.cpp | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 3f37ca6efe5a..d94dbcfc1200 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,15 @@ +2011-12-22 David Kilzer + + TestWebKitAPI: initialize the main thread before running tests + + + Reviewed by Adam Roben. + + * TestWebKitAPI/TestsController.cpp: + (TestWebKitAPI::TestsController::TestsController): Call + WTF::initializeMainThread() to prevent assertions in Debug + builds. + 2011-12-22 David Kilzer run-api-tests: dumpAllTests() should not use global variables diff --git a/Tools/TestWebKitAPI/TestsController.cpp b/Tools/TestWebKitAPI/TestsController.cpp index 29dcc714e3e2..955838fb9d39 100644 --- a/Tools/TestWebKitAPI/TestsController.cpp +++ b/Tools/TestWebKitAPI/TestsController.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "TestsController.h" +#include #include namespace TestWebKitAPI { @@ -38,6 +39,8 @@ TestsController& TestsController::shared() 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 -- 2.36.0