REGRESSION (r189526): Nightlies don't work on Mavericks
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Sep 2015 22:36:53 +0000 (22:36 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Sep 2015 22:36:53 +0000 (22:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149215

Reviewed by Daniel Bates.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::SQLiteDatabase): Fixed the check to work when cross-compiling
for 10.9 with 10.10 SDK.
(WebCore::SQLiteDatabase::disableThreadingChecks): Removed an obsolete version check -
WebCore has an #error elsewhere making sure that the version is higher than that.
(WebCore::SQLiteDatabase::authorizerFunction): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189990 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/sql/SQLiteDatabase.cpp

index 8493319..352f43b 100644 (file)
@@ -1,3 +1,17 @@
+2015-09-18  Alexey Proskuryakov  <ap@apple.com>
+
+        REGRESSION (r189526): Nightlies don't work on Mavericks
+        https://bugs.webkit.org/show_bug.cgi?id=149215
+
+        Reviewed by Daniel Bates.
+
+        * platform/sql/SQLiteDatabase.cpp:
+        (WebCore::SQLiteDatabase::SQLiteDatabase): Fixed the check to work when cross-compiling
+        for 10.9 with 10.10 SDK.
+        (WebCore::SQLiteDatabase::disableThreadingChecks): Removed an obsolete version check -
+        WebCore has an #error elsewhere making sure that the version is higher than that.
+        (WebCore::SQLiteDatabase::authorizerFunction): Ditto.
+
 2015-09-18  Alex Christensen  <achristensen@webkit.org>
 
         CMake clean build fix after r189971.
index 2e4b263..41110ff 100644 (file)
@@ -67,7 +67,7 @@ SQLiteDatabase::SQLiteDatabase()
         // std::call_once is used to stay on the safe side. See bug #143245.
         int ret = sqlite3_initialize();
         if (ret != SQLITE_OK) {
-#if SQLITE_VERSION_NUMBER >= 3007015
+#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && SQLITE_VERSION_NUMBER >= 3007015)
             WTFLogAlways("Failed to initialize SQLite: %s", sqlite3_errstr(ret));
 #else
             WTFLogAlways("Failed to initialize SQLite");
@@ -375,12 +375,8 @@ const char* SQLiteDatabase::lastErrorMsg()
 #ifndef NDEBUG
 void SQLiteDatabase::disableThreadingChecks()
 {
-    // This doesn't guarantee that SQList was compiled with -DTHREADSAFE, or that you haven't turned off the mutexes.
-#if SQLITE_VERSION_NUMBER >= 3003001
+    // Note that SQLite could be compiled with -DTHREADSAFE, or you may have turned off the mutexes.
     m_sharable = true;
-#else
-    ASSERT(0); // Your SQLite doesn't support sharing handles across threads.
-#endif
 }
 #endif
 
@@ -444,7 +440,6 @@ int SQLiteDatabase::authorizerFunction(void* userData, int actionCode, const cha
             return auth->allowAlterTable(parameter1, parameter2);
         case SQLITE_REINDEX:
             return auth->allowReindex(parameter1);
-#if SQLITE_VERSION_NUMBER >= 3003013 
         case SQLITE_ANALYZE:
             return auth->allowAnalyze(parameter1);
         case SQLITE_CREATE_VTABLE:
@@ -453,7 +448,6 @@ int SQLiteDatabase::authorizerFunction(void* userData, int actionCode, const cha
             return auth->dropVTable(parameter1, parameter2);
         case SQLITE_FUNCTION:
             return auth->allowFunction(parameter2);
-#endif
         default:
             ASSERT_NOT_REACHED();
             return SQLAuthDeny;