| 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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 OwnPtr<SQLErrorData> error = SQLErrorData::create(SQLError::UNKNOWN_
ERR, "database has been closed"); | 838 OwnPtr<SQLErrorData> error = SQLErrorData::create(SQLError::UNKNOWN_
ERR, "database has been closed"); |
| 839 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTas
k(&callTransactionErrorCallback, callback, passed(error.release()))); | 839 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTas
k(&callTransactionErrorCallback, callback, passed(error.release()))); |
| 840 } | 840 } |
| 841 } | 841 } |
| 842 } | 842 } |
| 843 | 843 |
| 844 void Database::scheduleTransactionCallback(SQLTransaction* transaction) | 844 void Database::scheduleTransactionCallback(SQLTransaction* transaction) |
| 845 { | 845 { |
| 846 // The task is constructed in a database thread, and destructed in the | 846 // The task is constructed in a database thread, and destructed in the |
| 847 // context thread. | 847 // context thread. |
| 848 getExecutionContext()->postTask(BLINK_FROM_HERE, createCrossThreadTask(&SQLT
ransaction::performPendingCallback, transaction)); | 848 getExecutionContext()->postTask(BLINK_FROM_HERE, createCrossThreadTask(&SQLT
ransaction::performPendingCallback, AllowCrossThreadAccess(transaction))); |
| 849 } | 849 } |
| 850 | 850 |
| 851 Vector<String> Database::performGetTableNames() | 851 Vector<String> Database::performGetTableNames() |
| 852 { | 852 { |
| 853 disableAuthorizer(); | 853 disableAuthorizer(); |
| 854 | 854 |
| 855 SQLiteStatement statement(sqliteDatabase(), "SELECT name FROM sqlite_master
WHERE type='table';"); | 855 SQLiteStatement statement(sqliteDatabase(), "SELECT name FROM sqlite_master
WHERE type='table';"); |
| 856 if (statement.prepare() != SQLResultOk) { | 856 if (statement.prepare() != SQLResultOk) { |
| 857 DLOG(ERROR) << "Unable to retrieve list of tables for database " << data
baseDebugName(); | 857 DLOG(ERROR) << "Unable to retrieve list of tables for database " << data
baseDebugName(); |
| 858 enableAuthorizer(); | 858 enableAuthorizer(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 return m_databaseThreadSecurityOrigin.get(); | 902 return m_databaseThreadSecurityOrigin.get(); |
| 903 return 0; | 903 return 0; |
| 904 } | 904 } |
| 905 | 905 |
| 906 bool Database::opened() | 906 bool Database::opened() |
| 907 { | 907 { |
| 908 return static_cast<bool>(acquireLoad(&m_opened)); | 908 return static_cast<bool>(acquireLoad(&m_opened)); |
| 909 } | 909 } |
| 910 | 910 |
| 911 } // namespace blink | 911 } // namespace blink |
| OLD | NEW |