Changeset 32807 in webkit for trunk/JavaScriptCore/API/JSBase.cpp


Ignore:
Timestamp:
May 2, 2008, 3:07:53 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoffrey Garen.

https://bugs.webkit.org/show_bug.cgi?id=18826
Make JavaScript heap per-thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSBase.cpp

    r29663 r32807  
    8080{
    8181    JSLock lock;
    82     if (!Collector::isBusy())
    83         Collector::collect();
     82
     83    // It might seem that we have a context passed to this function, and can use toJS(ctx)->heap(), but the parameter is likely to be NULL.
     84    // The performance difference should be negligible anyway.
     85    Heap* heap = Heap::threadHeap();
     86    if (!heap->isBusy())
     87        heap->collect();
    8488    // FIXME: Perhaps we should trigger a second mark and sweep
    8589    // once the garbage collector is done if this is called when
Note: See TracChangeset for help on using the changeset viewer.