diff options
author | Ben Murdoch <benm@google.com> | 2010-10-22 13:02:20 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-10-26 15:21:41 +0100 |
commit | a94275402997c11dd2e778633dacf4b7e630a35d (patch) | |
tree | e66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/platform/sql/SQLiteDatabase.cpp | |
parent | 09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff) | |
download | external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2 |
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/platform/sql/SQLiteDatabase.cpp')
-rw-r--r-- | WebCore/platform/sql/SQLiteDatabase.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/WebCore/platform/sql/SQLiteDatabase.cpp b/WebCore/platform/sql/SQLiteDatabase.cpp index 80d3946..b9e7639 100644 --- a/WebCore/platform/sql/SQLiteDatabase.cpp +++ b/WebCore/platform/sql/SQLiteDatabase.cpp @@ -34,6 +34,7 @@ #include <sqlite3.h> #include <wtf/Threading.h> #include <wtf/text/CString.h> +#include <wtf/text/StringConcatenate.h> namespace WebCore { @@ -64,8 +65,7 @@ bool SQLiteDatabase::open(const String& filename, bool forWebSQLDatabase) { close(); - m_lastError = SQLiteFileSystem::openDatabase(filename, &m_db, forWebSQLDatabase); - if (m_lastError != SQLITE_OK) { + if (SQLiteFileSystem::openDatabase(filename, &m_db, forWebSQLDatabase) != SQLITE_OK) { LOG_ERROR("SQLite database failed to load from %s\nCause - %s", filename.ascii().data(), sqlite3_errmsg(m_db)); sqlite3_close(m_db); @@ -100,6 +100,7 @@ void SQLiteDatabase::close() void SQLiteDatabase::interrupt() { +#if !ENABLE(SINGLE_THREADED) m_interrupted = true; while (!m_lockingMutex.tryLock()) { MutexLocker locker(m_databaseClosingMutex); @@ -110,6 +111,7 @@ void SQLiteDatabase::interrupt() } m_lockingMutex.unlock(); +#endif } bool SQLiteDatabase::isInterrupted() @@ -217,7 +219,7 @@ int64_t SQLiteDatabase::totalSize() void SQLiteDatabase::setSynchronous(SynchronousPragma sync) { - executeCommand(String::format("PRAGMA synchronous = %i", sync)); + executeCommand(makeString("PRAGMA synchronous = ", String::number(sync))); } void SQLiteDatabase::setBusyTimeout(int ms) |