]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - API/APIShims.h
JavaScriptCore-903.tar.gz
[apple/javascriptcore.git] / API / APIShims.h
index 892068d916746d6788de63cbecd4a205f37f2db0..2e13851417044b463b9941a9a5ec87d19ce63b4b 100644 (file)
@@ -27,6 +27,7 @@
 #define APIShims_h
 
 #include "CallFrame.h"
+#include "GCActivityCallback.h"
 #include "JSLock.h"
 #include <wtf/WTFThreadData.h>
 
@@ -38,8 +39,12 @@ protected:
         : m_globalData(globalData)
         , m_entryIdentifierTable(wtfThreadData().setCurrentIdentifierTable(globalData->identifierTable))
     {
+        UNUSED_PARAM(registerThread);
+#if ENABLE(JSC_MULTIPLE_THREADS)
         if (registerThread)
-            globalData->heap.registerThread();
+            globalData->heap.machineThreads().addCurrentThread();
+#endif
+        m_globalData->heap.activityCallback()->synchronize();
         m_globalData->timeoutChecker.start();
     }
 
@@ -85,6 +90,7 @@ public:
 
     ~APICallbackShim()
     {
+        m_globalData->heap.activityCallback()->synchronize();
         wtfThreadData().setCurrentIdentifierTable(m_globalData->identifierTable);
     }