Do not register Chromium's HTML5 DB VFS as the default
authordumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Nov 2009 19:14:56 +0000 (19:14 +0000)
committerdumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Nov 2009 19:14:56 +0000 (19:14 +0000)
VFS. Otherwise, other sqlite DB users in the same process will
stop working.

Reviewed by Dimitri Glazkov.

https://bugs.webkit.org/show_bug.cgi?id=31462

* platform/sql/chromium/SQLiteFileSystemChromium.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
* platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
(WebCore::SQLiteFileSystem::registerSQLiteVFS):
* platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
(WebCore::SQLiteFileSystem::registerSQLiteVFS):

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

WebCore/ChangeLog
WebCore/platform/sql/chromium/SQLiteFileSystemChromium.cpp
WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp
WebCore/platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp

index c34353933c5bac77695b137203f690d1ac0b6f76..43d3ac303fd369078faba553c238e87fe29869cf 100644 (file)
@@ -1,3 +1,20 @@
+2009-11-13  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Do not register Chromium's HTML5 DB VFS as the default
+        VFS. Otherwise, other sqlite DB users in the same process will
+        stop working.
+
+        https://bugs.webkit.org/show_bug.cgi?id=31462
+
+        * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
+        (WebCore::SQLiteFileSystem::openDatabase):
+        * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
+        (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+        * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
+        (WebCore::SQLiteFileSystem::registerSQLiteVFS):
+
 2009-11-13  Alexey Proskuryakov  <ap@apple.com>
 
         Windows build fix
         https://bugs.webkit.org/show_bug.cgi?id=30249
 
         Inherits CSSParserValueList class from FastAllocBase because it has 
-        been instantiated by 'new' in WebCor
\ No newline at end of file
+        been instantiated by 'new' in WebCor
index 3cf961f2b5cd09ed518a5b836184c609239bfa30..752c61312427c8def2c74863579e3cd7d5c9328a 100644 (file)
@@ -58,7 +58,8 @@ int SQLiteFileSystem::openDatabase(const String& fileName, sqlite3** database)
     // open databases using the default VFS
     // in renderers, it should be Chromium's VFS; in the browser process it should be SQLite's default VFS
     return sqlite3_open_v2(fileName.utf8().data(), database,
-                           SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, 0);
+                           SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX,
+                           "chromium_vfs");
 }
 
 String SQLiteFileSystem::getFileNameForNewDatabase(
index ef4dfa7669fd1b7ac87c0b2f223b11840519fe91..0050a430a56291a74429284c470abd90d2478034 100644 (file)
@@ -200,7 +200,7 @@ void SQLiteFileSystem::registerSQLiteVFS()
         unix_vfs->xCurrentTime,
         unix_vfs->xGetLastError
     };
-    sqlite3_vfs_register(&chromium_vfs, 1);
+    sqlite3_vfs_register(&chromium_vfs, 0);
 }
 
 } // namespace WebCore
index 153793b5882f6eef7a1b41fcc32b05bdb0e0d052..7b57db1e3db17f86e76e22b9505a85c19dc42c5f 100644 (file)
@@ -169,7 +169,7 @@ void SQLiteFileSystem::registerSQLiteVFS()
         win32_vfs->xCurrentTime,
         win32_vfs->xGetLastError
     };
-    sqlite3_vfs_register(&chromium_vfs, 1);
+    sqlite3_vfs_register(&chromium_vfs, 0);
 }
 
 } // namespace WebCore