OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 | 209 |
210 return tableNames; | 210 return tableNames; |
211 } | 211 } |
212 | 212 |
213 Vector<String> Database::tableNames() | 213 Vector<String> Database::tableNames() |
214 { | 214 { |
215 // FIXME: Not using isolatedCopy on these strings looks ok since threads tak
e strict turns | 215 // FIXME: Not using isolatedCopy on these strings looks ok since threads tak
e strict turns |
216 // in dealing with them. However, if the code changes, this may not be true
anymore. | 216 // in dealing with them. However, if the code changes, this may not be true
anymore. |
217 Vector<String> result; | 217 Vector<String> result; |
218 DatabaseTaskSynchronizer synchronizer; | 218 TaskSynchronizer synchronizer; |
219 if (!databaseContext()->databaseThread() || databaseContext()->databaseThrea
d()->terminationRequested(&synchronizer)) | 219 if (!databaseContext()->databaseThread() || databaseContext()->databaseThrea
d()->terminationRequested(&synchronizer)) |
220 return result; | 220 return result; |
221 | 221 |
222 OwnPtr<DatabaseTableNamesTask> task = DatabaseTableNamesTask::create(this, &
synchronizer, result); | 222 OwnPtr<DatabaseTableNamesTask> task = DatabaseTableNamesTask::create(this, &
synchronizer, result); |
223 databaseContext()->databaseThread()->scheduleTask(task.release()); | 223 databaseContext()->databaseThread()->scheduleTask(task.release()); |
224 synchronizer.waitForTaskCompletion(); | 224 synchronizer.waitForTaskCompletion(); |
225 | 225 |
226 return result; | 226 return result; |
227 } | 227 } |
228 | 228 |
(...skipping 11 matching lines...) Expand all Loading... |
240 backend()->reportStartTransactionResult(errorSite, webSqlErrorCode, sqliteEr
rorCode); | 240 backend()->reportStartTransactionResult(errorSite, webSqlErrorCode, sqliteEr
rorCode); |
241 } | 241 } |
242 | 242 |
243 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode,
int sqliteErrorCode) | 243 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode,
int sqliteErrorCode) |
244 { | 244 { |
245 backend()->reportCommitTransactionResult(errorSite, webSqlErrorCode, sqliteE
rrorCode); | 245 backend()->reportCommitTransactionResult(errorSite, webSqlErrorCode, sqliteE
rrorCode); |
246 } | 246 } |
247 | 247 |
248 | 248 |
249 } // namespace WebCore | 249 } // namespace WebCore |
OLD | NEW |