void GCController::garbageCollectSoon() { // We only use reportAbandonedObjectGraph for systems for which there's an implementation // of the garbage collector timers in JavaScriptCore. We wouldn't need this if JavaScriptCore // used a timer implementation from WTF like RunLoop::Timer. #if USE(CF) || USE(GLIB) JSLockHolder lock(JSDOMWindow::commonVM()); JSDOMWindow::commonVM().heap.reportAbandonedObjectGraph(); #else garbageCollectOnNextRunLoop(); #endif }
void GCController::garbageCollectSoon() { // We only use reportAbandonedObjectGraph on systems with CoreFoundation // since it uses a run-loop-based timer that is currently only available on // systems with CoreFoundation. If and when the notion of a run loop is pushed // down into WTF so that more platforms can take advantage of it, we will be // able to use reportAbandonedObjectGraph on more platforms. #if USE(CF) JSLockHolder lock(JSDOMWindow::commonVM()); JSDOMWindow::commonVM().heap.reportAbandonedObjectGraph(); #else garbageCollectOnNextRunLoop(); #endif }