static gboolean processWork(void* data) { // quit doing work once a load is in progress while (WorkQueue::shared()->count() > 0 && !topLoadingFrame) { WorkQueueItem* item = WorkQueue::shared()->dequeue(); ASSERT(item); item->invoke(); delete item; } // if we didn't start a new load, then we finished all the commands, so we're ready to dump state if (!topLoadingFrame && !gLayoutTestController->waitToDump()) dump(); return FALSE; }
void LayoutTestController::processWork() { qDebug() << ">>>processWork"; // quit doing work once a load is in progress while (WorkQueue::shared()->count() > 0 && !m_topLoadingFrame) { WorkQueueItem* item = WorkQueue::shared()->dequeue(); Q_ASSERT(item); item->invoke(); delete item; } // if we didn't start a new load, then we finished all the commands, so we're ready to dump state if (!m_topLoadingFrame && !shouldWaitUntilDone()) { emit done(); m_isLoading = false; } }