[CF] Web process continually eating memory on simple, shared Google Docs spreadsheet.
<https://webkit.org/b/147403>
<rdar://problem/18835799>

Reviewed by Geoffrey Garen.

Make sure we service the CFRunLoop on worker threads, since ports using CoreFoundation
will be scheduling garbage collections and heap sweeps using CFRunLoop timers.

This fix is a stopgap. Long term we need a better design for integrating GC tasks with
with the web worker run loop.

* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode): Instead of sleeping forever, calculate a better
wakeup deadline by asking the CFRunLoop when its next timer will fire. Then, when a
timeout occurs, call CFRunLoopRunInMode (with seconds=0) to service pending timers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@187630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed