| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 databaseContext()->databaseThread()->recordDatabaseClosed(this); | 105 databaseContext()->databaseThread()->recordDatabaseClosed(this); |
| 106 } | 106 } |
| 107 | 107 |
| 108 PassRefPtrWillBeRawPtr<SQLTransactionBackend> DatabaseBackend::runTransaction(Pa
ssRefPtrWillBeRawPtr<SQLTransaction> transaction, | 108 PassRefPtrWillBeRawPtr<SQLTransactionBackend> DatabaseBackend::runTransaction(Pa
ssRefPtrWillBeRawPtr<SQLTransaction> transaction, |
| 109 bool readOnly, const ChangeVersionData* data) | 109 bool readOnly, const ChangeVersionData* data) |
| 110 { | 110 { |
| 111 MutexLocker locker(m_transactionInProgressMutex); | 111 MutexLocker locker(m_transactionInProgressMutex); |
| 112 if (!m_isTransactionQueueEnabled) | 112 if (!m_isTransactionQueueEnabled) |
| 113 return nullptr; | 113 return nullptr; |
| 114 | 114 |
| 115 RefPtr<SQLTransactionWrapper> wrapper; | 115 RefPtrWillBeRawPtr<SQLTransactionWrapper> wrapper = nullptr; |
| 116 if (data) | 116 if (data) |
| 117 wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVers
ion()); | 117 wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVers
ion()); |
| 118 | 118 |
| 119 RefPtrWillBeRawPtr<SQLTransactionBackend> transactionBackend = SQLTransactio
nBackend::create(this, transaction, wrapper, readOnly); | 119 RefPtrWillBeRawPtr<SQLTransactionBackend> transactionBackend = SQLTransactio
nBackend::create(this, transaction, wrapper.release(), readOnly); |
| 120 m_transactionQueue.append(transactionBackend); | 120 m_transactionQueue.append(transactionBackend); |
| 121 if (!m_transactionInProgress) | 121 if (!m_transactionInProgress) |
| 122 scheduleTransaction(); | 122 scheduleTransaction(); |
| 123 | 123 |
| 124 return transactionBackend; | 124 return transactionBackend; |
| 125 } | 125 } |
| 126 | 126 |
| 127 void DatabaseBackend::inProgressTransactionCompleted() | 127 void DatabaseBackend::inProgressTransactionCompleted() |
| 128 { | 128 { |
| 129 MutexLocker locker(m_transactionInProgressMutex); | 129 MutexLocker locker(m_transactionInProgressMutex); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 { | 162 { |
| 163 return databaseContext()->databaseThread()->transactionClient(); | 163 return databaseContext()->databaseThread()->transactionClient(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const | 166 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const |
| 167 { | 167 { |
| 168 return databaseContext()->databaseThread()->transactionCoordinator(); | 168 return databaseContext()->databaseThread()->transactionCoordinator(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace WebCore | 171 } // namespace WebCore |
| OLD | NEW |