Example #1
0
void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task)
{
    ASSERT(m_thread);
    ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination());
    // WebThread takes ownership of the task.
    m_thread->postTask(task.leakPtr());
}
Example #2
0
void DatabaseThread::scheduleImmediateTask(PassOwnPtr<DatabaseTask> task)
{
    ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination());
    m_queue.prepend(task);
}