ASSERTs in isMainThread after USE(WEB_THREAD) MainThread changes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 01:41:20 +0000 (01:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 01:41:20 +0000 (01:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121650

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-09-19
Reviewed by Benjamin Poulain.

* wtf/mac/MainThreadMac.mm:
(WTF::initializeMainThreadPlatform):

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

Source/WTF/ChangeLog
Source/WTF/wtf/mac/MainThreadMac.mm

index f18d2525c8d86f0e629fa885c8f09a375d3fded1..93121633c83e75e3cdf5d8fc26a6ca9e36805369 100644 (file)
@@ -1,3 +1,13 @@
+2013-09-19  Joseph Pecoraro  <pecoraro@apple.com>
+
+        ASSERTs in isMainThread after USE(WEB_THREAD) MainThread changes
+        https://bugs.webkit.org/show_bug.cgi?id=121650
+
+        Reviewed by Benjamin Poulain.
+
+        * wtf/mac/MainThreadMac.mm:
+        (WTF::initializeMainThreadPlatform):
+
 2013-09-19  Daniel Bates  <dabates@apple.com>
 
         [iOS] Define mainThreadEstablishedAsPthreadMain to be true in WTF::initializeMainThreadPlatform()
 2013-09-19  Daniel Bates  <dabates@apple.com>
 
         [iOS] Define mainThreadEstablishedAsPthreadMain to be true in WTF::initializeMainThreadPlatform()
index 70c0cfdd89cfe9072acc5d65239ab64400e7daf8..3794d936aa274d34707faf05edf0ec6363d69202 100644 (file)
@@ -72,12 +72,12 @@ void initializeMainThreadPlatform()
     ASSERT(!staticMainThreadCaller);
     staticMainThreadCaller = [[JSWTFMainThreadCaller alloc] init];
 
     ASSERT(!staticMainThreadCaller);
     staticMainThreadCaller = [[JSWTFMainThreadCaller alloc] init];
 
-    mainThreadEstablishedAsPthreadMain = true;
-
 #if !USE(WEB_THREAD)
 #if !USE(WEB_THREAD)
+    mainThreadEstablishedAsPthreadMain = false;
     mainThreadPthread = pthread_self();
     mainThreadNSThread = [[NSThread currentThread] retain];
 #else
     mainThreadPthread = pthread_self();
     mainThreadNSThread = [[NSThread currentThread] retain];
 #else
+    mainThreadEstablishedAsPthreadMain = true;
     ASSERT(!mainThreadPthread);
     ASSERT(!mainThreadNSThread);
 #endif
     ASSERT(!mainThreadPthread);
     ASSERT(!mainThreadNSThread);
 #endif