summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/sql/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/sql/chromium')
-rw-r--r--WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp b/WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp
index f8ede69..6549936 100644
--- a/WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp
+++ b/WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp
@@ -64,16 +64,15 @@ int chromiumOpen(sqlite3_vfs* vfs, const char* fileName,
{
chromium_sqlite3_initialize_unix_sqlite3_file(id);
int fd = -1;
- int dirfd = -1;
int result = chromium_sqlite3_get_reusable_file_handle(id, fileName, desiredFlags, &fd);
if (result != SQLITE_OK)
return result;
if (fd < 0) {
- fd = ChromiumBridge::databaseOpenFile(fileName, desiredFlags, &dirfd);
+ fd = ChromiumBridge::databaseOpenFile(fileName, desiredFlags);
if ((fd < 0) && (desiredFlags & SQLITE_OPEN_READWRITE)) {
int newFlags = (desiredFlags & ~(SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE)) | SQLITE_OPEN_READONLY;
- fd = ChromiumBridge::databaseOpenFile(fileName, newFlags, &dirfd);
+ fd = ChromiumBridge::databaseOpenFile(fileName, newFlags);
}
}
if (fd < 0) {
@@ -86,13 +85,11 @@ int chromiumOpen(sqlite3_vfs* vfs, const char* fileName,
chromium_sqlite3_update_reusable_file_handle(id, fd, desiredFlags);
fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
- if (dirfd >= 0)
- fcntl(dirfd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
// The mask 0x00007F00 gives us the 7 bits that determine the type of the file SQLite is trying to open.
int fileType = desiredFlags & 0x00007F00;
int noLock = (fileType != SQLITE_OPEN_MAIN_DB);
- result = chromium_sqlite3_fill_in_unix_sqlite3_file(vfs, fd, dirfd, id, fileName, noLock);
+ result = chromium_sqlite3_fill_in_unix_sqlite3_file(vfs, fd, -1, id, fileName, noLock);
if (result != SQLITE_OK)
chromium_sqlite3_destroy_reusable_file_handle(id);
return result;