diff options
Diffstat (limited to 'Source/WebCore/bindings/js/GCController.cpp')
-rw-r--r-- | Source/WebCore/bindings/js/GCController.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/WebCore/bindings/js/GCController.cpp b/Source/WebCore/bindings/js/GCController.cpp index fe0e36f..765e363 100644 --- a/Source/WebCore/bindings/js/GCController.cpp +++ b/Source/WebCore/bindings/js/GCController.cpp @@ -29,13 +29,9 @@ #include "JSDOMWindow.h" #include <runtime/JSGlobalData.h> #include <runtime/JSLock.h> -#include <runtime/Heap.h> +#include <heap/Heap.h> #include <wtf/StdLibExtras.h> -#if USE(PTHREADS) -#include <pthread.h> -#endif - using namespace JSC; namespace WebCore { @@ -78,13 +74,14 @@ void GCController::garbageCollectNow() void GCController::garbageCollectOnAlternateThreadForDebugging(bool waitUntilDone) { -#if USE(PTHREADS) - pthread_t thread; - pthread_create(&thread, NULL, collect, NULL); + ThreadIdentifier threadID = createThread(collect, 0, "WebCore: GCController"); + + if (waitUntilDone) { + waitForThreadCompletion(threadID, 0); + return; + } - if (waitUntilDone) - pthread_join(thread, NULL); -#endif + detachThread(threadID); } } // namespace WebCore |