OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 m_isTransactionQueueEnabled = false; | 99 m_isTransactionQueueEnabled = false; |
100 m_transactionInProgress = false; | 100 m_transactionInProgress = false; |
101 } | 101 } |
102 | 102 |
103 closeDatabase(); | 103 closeDatabase(); |
104 databaseContext()->databaseThread()->recordDatabaseClosed(this); | 104 databaseContext()->databaseThread()->recordDatabaseClosed(this); |
105 } | 105 } |
106 | 106 |
107 PassRefPtr<SQLTransactionBackend> DatabaseBackend::runTransaction(PassRefPtr<SQL
Transaction> transaction, | 107 PassRefPtr<SQLTransactionBackend> DatabaseBackend::runTransaction(PassRefPtrWill
BeRawPtr<SQLTransaction> transaction, |
108 bool readOnly, const ChangeVersionData* data) | 108 bool readOnly, const ChangeVersionData* data) |
109 { | 109 { |
110 MutexLocker locker(m_transactionInProgressMutex); | 110 MutexLocker locker(m_transactionInProgressMutex); |
111 if (!m_isTransactionQueueEnabled) | 111 if (!m_isTransactionQueueEnabled) |
112 return nullptr; | 112 return nullptr; |
113 | 113 |
114 RefPtr<SQLTransactionWrapper> wrapper; | 114 RefPtr<SQLTransactionWrapper> wrapper; |
115 if (data) | 115 if (data) |
116 wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVers
ion()); | 116 wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVers
ion()); |
117 | 117 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 { | 161 { |
162 return databaseContext()->databaseThread()->transactionClient(); | 162 return databaseContext()->databaseThread()->transactionClient(); |
163 } | 163 } |
164 | 164 |
165 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const | 165 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const |
166 { | 166 { |
167 return databaseContext()->databaseThread()->transactionCoordinator(); | 167 return databaseContext()->databaseThread()->transactionCoordinator(); |
168 } | 168 } |
169 | 169 |
170 } // namespace WebCore | 170 } // namespace WebCore |
OLD | NEW |