| 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 closeDatabase(); | 98 closeDatabase(); |
| 99 databaseContext()->databaseThread()->recordDatabaseClosed(this); | 99 databaseContext()->databaseThread()->recordDatabaseClosed(this); |
| 100 } | 100 } |
| 101 | 101 |
| 102 PassRefPtr<SQLTransactionBackend> DatabaseBackend::runTransaction(PassRefPtr<SQL
Transaction> transaction, | 102 PassRefPtr<SQLTransactionBackend> DatabaseBackend::runTransaction(PassRefPtr<SQL
Transaction> transaction, |
| 103 bool readOnly, const ChangeVersionData* data) | 103 bool readOnly, const ChangeVersionData* data) |
| 104 { | 104 { |
| 105 MutexLocker locker(m_transactionInProgressMutex); | 105 MutexLocker locker(m_transactionInProgressMutex); |
| 106 if (!m_isTransactionQueueEnabled) | 106 if (!m_isTransactionQueueEnabled) |
| 107 return 0; | 107 return nullptr; |
| 108 | 108 |
| 109 RefPtr<SQLTransactionWrapper> wrapper; | 109 RefPtr<SQLTransactionWrapper> wrapper; |
| 110 if (data) | 110 if (data) |
| 111 wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVers
ion()); | 111 wrapper = ChangeVersionWrapper::create(data->oldVersion(), data->newVers
ion()); |
| 112 | 112 |
| 113 RefPtr<SQLTransactionBackend> transactionBackend = SQLTransactionBackend::cr
eate(this, transaction, wrapper, readOnly); | 113 RefPtr<SQLTransactionBackend> transactionBackend = SQLTransactionBackend::cr
eate(this, transaction, wrapper, readOnly); |
| 114 m_transactionQueue.append(transactionBackend); | 114 m_transactionQueue.append(transactionBackend); |
| 115 if (!m_transactionInProgress) | 115 if (!m_transactionInProgress) |
| 116 scheduleTransaction(); | 116 scheduleTransaction(); |
| 117 | 117 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 { | 156 { |
| 157 return databaseContext()->databaseThread()->transactionClient(); | 157 return databaseContext()->databaseThread()->transactionClient(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const | 160 SQLTransactionCoordinator* DatabaseBackend::transactionCoordinator() const |
| 161 { | 161 { |
| 162 return databaseContext()->databaseThread()->transactionCoordinator(); | 162 return databaseContext()->databaseThread()->transactionCoordinator(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace WebCore | 165 } // namespace WebCore |
| OLD | NEW |