diff options
author | Kristian Monsen <kristianm@google.com> | 2010-05-21 16:53:46 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-05-25 10:24:15 +0100 |
commit | 6c2af9490927c3c5959b5cb07461b646f8b32f6c (patch) | |
tree | f7111b9b22befab472616c1d50ec94eb50f1ec8c /WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp | |
parent | a149172322a9067c14e8b474a53e63649aa17cad (diff) | |
download | external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.zip external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.gz external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.bz2 |
Merge WebKit at r59636: Initial merge by git
Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91
Diffstat (limited to 'WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp')
-rw-r--r-- | WebCore/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp | 9 |
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; |