| 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 runTransaction(transaction, readOnly, changeVersionData); | 868 runTransaction(transaction, readOnly, changeVersionData); |
| 869 if (!transactionBackend) { | 869 if (!transactionBackend) { |
| 870 SQLTransactionErrorCallback* callback = transaction->releaseErrorCallback(); | 870 SQLTransactionErrorCallback* callback = transaction->releaseErrorCallback(); |
| 871 ASSERT(callback == originalErrorCallback); | 871 ASSERT(callback == originalErrorCallback); |
| 872 if (callback) { | 872 if (callback) { |
| 873 std::unique_ptr<SQLErrorData> error = SQLErrorData::create( | 873 std::unique_ptr<SQLErrorData> error = SQLErrorData::create( |
| 874 SQLError::kUnknownErr, "database has been closed"); | 874 SQLError::kUnknownErr, "database has been closed"); |
| 875 getExecutionContext()->postTask( | 875 getExecutionContext()->postTask( |
| 876 BLINK_FROM_HERE, createSameThreadTask(&callTransactionErrorCallback, | 876 BLINK_FROM_HERE, createSameThreadTask(&callTransactionErrorCallback, |
| 877 wrapPersistent(callback), | 877 wrapPersistent(callback), |
| 878 passed(std::move(error)))); | 878 WTF::passed(std::move(error)))); |
| 879 } | 879 } |
| 880 } | 880 } |
| 881 } | 881 } |
| 882 | 882 |
| 883 void Database::scheduleTransactionCallback(SQLTransaction* transaction) { | 883 void Database::scheduleTransactionCallback(SQLTransaction* transaction) { |
| 884 // The task is constructed in a database thread, and destructed in the | 884 // The task is constructed in a database thread, and destructed in the |
| 885 // context thread. | 885 // context thread. |
| 886 getExecutionContext()->postTask( | 886 getExecutionContext()->postTask( |
| 887 BLINK_FROM_HERE, | 887 BLINK_FROM_HERE, |
| 888 createCrossThreadTask(&SQLTransaction::performPendingCallback, | 888 createCrossThreadTask(&SQLTransaction::performPendingCallback, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) | 944 if (getDatabaseContext()->databaseThread()->isDatabaseThread()) |
| 945 return m_databaseThreadSecurityOrigin.get(); | 945 return m_databaseThreadSecurityOrigin.get(); |
| 946 return nullptr; | 946 return nullptr; |
| 947 } | 947 } |
| 948 | 948 |
| 949 bool Database::opened() { | 949 bool Database::opened() { |
| 950 return static_cast<bool>(acquireLoad(&m_opened)); | 950 return static_cast<bool>(acquireLoad(&m_opened)); |
| 951 } | 951 } |
| 952 | 952 |
| 953 } // namespace blink | 953 } // namespace blink |
| OLD | NEW |