Changeset 84113 in webkit


Ignore:
Timestamp:
Apr 17, 2011 4:08:13 PM (13 years ago)
Author:
Patrick Gansterer
Message:

2011-04-17 Patrick Gansterer <Patrick Gansterer>

Reviewed by Eric Seidel.

Remove pthread dependency of GCController
https://bugs.webkit.org/show_bug.cgi?id=54833

  • bindings/js/GCController.cpp: (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84110 r84113  
     12011-04-17  Patrick Gansterer  <paroga@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Remove pthread dependency of GCController
     6        https://bugs.webkit.org/show_bug.cgi?id=54833
     7
     8        * bindings/js/GCController.cpp:
     9        (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
     10
    1112011-04-17  Gavin Peters  <gavinp@chromium.org>
    212
  • trunk/Source/WebCore/bindings/js/GCController.cpp

    r83419 r84113  
    3232#include <heap/Heap.h>
    3333#include <wtf/StdLibExtras.h>
    34 
    35 #if USE(PTHREADS)
    36 #include <pthread.h>
    37 #endif
    3834
    3935using namespace JSC;
     
    7975void GCController::garbageCollectOnAlternateThreadForDebugging(bool waitUntilDone)
    8076{
    81 #if USE(PTHREADS)
    82     pthread_t thread;
    83     pthread_create(&thread, NULL, collect, NULL);
     77    ThreadIdentifier threadID = createThread(collect, 0, "WebCore: GCController");
    8478
    85     if (waitUntilDone)
    86         pthread_join(thread, NULL);
    87 #endif
     79    if (waitUntilDone) {
     80        waitForThreadCompletion(threadID, 0);
     81        return;
     82    }
     83
     84    detachThread(threadID);
    8885}
    8986
Note: See TracChangeset for help on using the changeset viewer.