Better fix for sqlite problems

It seems that locking isn’t yet supported on Fuchsia.

Change-Id: I9b8419e6ba11454cb7319492019550fa6b197968
diff --git a/Source/WebCore/platform/sql/SQLiteDatabase.cpp b/Source/WebCore/platform/sql/SQLiteDatabase.cpp
index 72220c4..37943e2 100644
--- a/Source/WebCore/platform/sql/SQLiteDatabase.cpp
+++ b/Source/WebCore/platform/sql/SQLiteDatabase.cpp
@@ -82,12 +82,7 @@
 
     close();
 
-#if PLATFORM(FUCSHIA)
-    // FIXME(robtsuk) figure out why sqlite doesn't like the filesystem
-    m_openError = SQLiteFileSystem::openDatabase(":memory:", &m_db, forWebSQLDatabase);
-#else
     m_openError = SQLiteFileSystem::openDatabase(filename, &m_db, forWebSQLDatabase);
-#endif
     if (m_openError != SQLITE_OK) {
         m_openErrorMessage = m_db ? sqlite3_errmsg(m_db) : "sqlite_open returned null";
         LOG_ERROR("SQLite database failed to load from %s\nCause - %s", filename.ascii().data(),
diff --git a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
index b03c455..98022cd 100644
--- a/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
+++ b/Source/WebCore/platform/sql/SQLiteFileSystem.cpp
@@ -50,7 +50,11 @@
 
 int SQLiteFileSystem::openDatabase(const String& filename, sqlite3** database, bool)
 {
+#if PLATFORM(FUCHSIA)
+    return sqlite3_open_v2(fileSystemRepresentation(filename).data(), database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_AUTOPROXY, "unix-none");
+#else
     return sqlite3_open_v2(fileSystemRepresentation(filename).data(), database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_AUTOPROXY, nullptr);
+#endif
 }
 
 String SQLiteFileSystem::appendDatabaseFileNameToPath(const String& path, const String& fileName)