| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "public/platform/Platform.h" | 39 #include "public/platform/Platform.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 DatabaseThread::DatabaseThread() | 43 DatabaseThread::DatabaseThread() |
| 44 : m_transactionClient(adoptPtr(new SQLTransactionClient())) | 44 : m_transactionClient(adoptPtr(new SQLTransactionClient())) |
| 45 , m_transactionCoordinator(new SQLTransactionCoordinator()) | 45 , m_transactionCoordinator(new SQLTransactionCoordinator()) |
| 46 , m_cleanupSync(0) | 46 , m_cleanupSync(0) |
| 47 , m_terminationRequested(false) | 47 , m_terminationRequested(false) |
| 48 { | 48 { |
| 49 ASSERT(isMainThread()); |
| 49 } | 50 } |
| 50 | 51 |
| 51 DatabaseThread::~DatabaseThread() | 52 DatabaseThread::~DatabaseThread() |
| 52 { | 53 { |
| 53 ASSERT(m_openDatabaseSet.isEmpty()); | 54 ASSERT(m_openDatabaseSet.isEmpty()); |
| 54 ASSERT(!m_thread); | 55 ASSERT(!m_thread); |
| 55 } | 56 } |
| 56 | 57 |
| 57 DEFINE_TRACE(DatabaseThread) | 58 DEFINE_TRACE(DatabaseThread) |
| 58 { | 59 { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task) | 156 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task) |
| 156 { | 157 { |
| 157 ASSERT(m_thread); | 158 ASSERT(m_thread); |
| 158 ASSERT(!terminationRequested()); | 159 ASSERT(!terminationRequested()); |
| 159 // WebThread takes ownership of the task. | 160 // WebThread takes ownership of the task. |
| 160 m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&DatabaseTask::r
un, task))); | 161 m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&DatabaseTask::r
un, task))); |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |