| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 ASSERT(m_openDatabaseSet.isEmpty()); | 53 ASSERT(m_openDatabaseSet.isEmpty()); |
| 54 ASSERT(!m_thread); | 54 ASSERT(!m_thread); |
| 55 } | 55 } |
| 56 | 56 |
| 57 DEFINE_TRACE(DatabaseThread) {} | 57 DEFINE_TRACE(DatabaseThread) {} |
| 58 | 58 |
| 59 void DatabaseThread::start() { | 59 void DatabaseThread::start() { |
| 60 ASSERT(isMainThread()); | 60 ASSERT(isMainThread()); |
| 61 if (m_thread) | 61 if (m_thread) |
| 62 return; | 62 return; |
| 63 m_thread = WebThreadSupportingGC::create("WebCore: Database", | 63 m_thread = WebThreadSupportingGC::create("WebCore: Database"); |
| 64 BlinkGC::PerThreadHeapMode); | |
| 65 m_thread->postTask(BLINK_FROM_HERE, | 64 m_thread->postTask(BLINK_FROM_HERE, |
| 66 crossThreadBind(&DatabaseThread::setupDatabaseThread, | 65 crossThreadBind(&DatabaseThread::setupDatabaseThread, |
| 67 wrapCrossThreadPersistent(this))); | 66 wrapCrossThreadPersistent(this))); |
| 68 } | 67 } |
| 69 | 68 |
| 70 void DatabaseThread::setupDatabaseThread() { | 69 void DatabaseThread::setupDatabaseThread() { |
| 71 m_thread->initialize(); | 70 m_thread->initialize(); |
| 72 m_transactionCoordinator = new SQLTransactionCoordinator(); | 71 m_transactionCoordinator = new SQLTransactionCoordinator(); |
| 73 } | 72 } |
| 74 | 73 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 MutexLocker lock(m_terminationRequestedMutex); | 167 MutexLocker lock(m_terminationRequestedMutex); |
| 169 ASSERT(!m_terminationRequested); | 168 ASSERT(!m_terminationRequested); |
| 170 } | 169 } |
| 171 #endif | 170 #endif |
| 172 // WebThread takes ownership of the task. | 171 // WebThread takes ownership of the task. |
| 173 m_thread->postTask(BLINK_FROM_HERE, | 172 m_thread->postTask(BLINK_FROM_HERE, |
| 174 crossThreadBind(&DatabaseTask::run, std::move(task))); | 173 crossThreadBind(&DatabaseTask::run, std::move(task))); |
| 175 } | 174 } |
| 176 | 175 |
| 177 } // namespace blink | 176 } // namespace blink |
| OLD | NEW |