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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 DEFINE_TRACE(DatabaseThread) | 59 DEFINE_TRACE(DatabaseThread) |
60 { | 60 { |
61 } | 61 } |
62 | 62 |
63 void DatabaseThread::start() | 63 void DatabaseThread::start() |
64 { | 64 { |
65 ASSERT(isMainThread()); | 65 ASSERT(isMainThread()); |
66 if (m_thread) | 66 if (m_thread) |
67 return; | 67 return; |
68 m_thread = WebThreadSupportingGC::create("WebCore: Database", true); | 68 m_thread = WebThreadSupportingGC::create("WebCore: Database", BlinkGC::PerTh
readHeapMode); |
69 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&DatabaseThread::setupDa
tabaseThread, wrapCrossThreadPersistent(this))); | 69 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&DatabaseThread::setupDa
tabaseThread, wrapCrossThreadPersistent(this))); |
70 } | 70 } |
71 | 71 |
72 void DatabaseThread::setupDatabaseThread() | 72 void DatabaseThread::setupDatabaseThread() |
73 { | 73 { |
74 m_thread->initialize(); | 74 m_thread->initialize(); |
75 m_transactionCoordinator = new SQLTransactionCoordinator(); | 75 m_transactionCoordinator = new SQLTransactionCoordinator(); |
76 } | 76 } |
77 | 77 |
78 void DatabaseThread::terminate() | 78 void DatabaseThread::terminate() |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 { | 170 { |
171 MutexLocker lock(m_terminationRequestedMutex); | 171 MutexLocker lock(m_terminationRequestedMutex); |
172 ASSERT(!m_terminationRequested); | 172 ASSERT(!m_terminationRequested); |
173 } | 173 } |
174 #endif | 174 #endif |
175 // WebThread takes ownership of the task. | 175 // WebThread takes ownership of the task. |
176 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&DatabaseTask::run, std:
:move(task))); | 176 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&DatabaseTask::run, std:
:move(task))); |
177 } | 177 } |
178 | 178 |
179 } // namespace blink | 179 } // namespace blink |
OLD | NEW |