jsc.cpp should call initializeMainThread() to make sure that GC thread assertions...
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Sep 2016 21:20:02 +0000 (21:20 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Sep 2016 21:20:02 +0000 (21:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161801

Reviewed by Keith Miller.

The GC has debug assertions that certain things don't happen on GC threads. Those assertions
are no-ops unless initializeGCThreads() is called, and I think the most canonical way to do
that is to call initializeMainThread().

* jsc.cpp:
(jscmain):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jsc.cpp

index d0c5828..de66524 100644 (file)
@@ -1,3 +1,17 @@
+2016-09-09  Filip Pizlo  <fpizlo@apple.com>
+
+        jsc.cpp should call initializeMainThread() to make sure that GC thread assertions work
+        https://bugs.webkit.org/show_bug.cgi?id=161801
+
+        Reviewed by Keith Miller.
+        
+        The GC has debug assertions that certain things don't happen on GC threads. Those assertions
+        are no-ops unless initializeGCThreads() is called, and I think the most canonical way to do
+        that is to call initializeMainThread().
+
+        * jsc.cpp:
+        (jscmain):
+
 2016-09-09  Saam Barati  <sbarati@apple.com>
 
         Make hasOwnProperty ALWAYS_INLINE
index a96253a..9b8cd33 100644 (file)
@@ -2559,9 +2559,7 @@ int jscmain(int argc, char** argv)
     CommandLine options(argc, argv);
 
     // Initialize JSC before getting VM.
-#if ENABLE(SAMPLING_REGIONS)
     WTF::initializeMainThread();
-#endif
     JSC::initializeThreading();
 
     VM* vm = &VM::create(LargeHeap).leakRef();