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()); }
void DatabaseThread::scheduleImmediateTask(PassOwnPtr<DatabaseTask> task) { ASSERT(!task->hasSynchronizer() || task->hasCheckedForTermination()); m_queue.prepend(task); }