Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch

Issue 885473002: [sql] Rewrite sqlite patching "system". (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo in readme. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch
diff --git a/third_party/sqlite/webdb.patch b/third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch
similarity index 71%
rename from third_party/sqlite/webdb.patch
rename to third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch
index 6a4e934f46561fb50e20e4a0b1146b53453d1155..4d2093307abff4334869b16b12c968d9d1a16c4b 100644
--- a/third_party/sqlite/webdb.patch
+++ b/third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch
@@ -1,13 +1,31 @@
-The WebDatabase implementation in the renderer users a custom vfs to
-broker file open and other requests. This modifies the built-in vfs
-implementation to let that code share much of the implementation
-details.
+From 25f1f784320aa0e32b69f78098b652b30df40865 Mon Sep 17 00:00:00 2001
+From: dumi <dumi@chromium.org>
+Date: Mon, 20 Jul 2009 23:40:51 +0000
+Subject: [PATCH 06/23] Modify default VFS to support WebDatabase.
-diff --git src/os_unix.c src/os_unix.c
-index ef04a72..e5e1509 100644
---- src/os_unix.c
-+++ src/os_unix.c
-@@ -3496,9 +3496,16 @@ typedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);
+The renderer WebDatabase implementation needs to broker certain requests
+to the browser. This modifies SQLite to allow monkey-patching the VFS
+to support this.
+
+NOTE(shess): This patch relies on core SQLite implementation details
+remaining unchanged. When importing a new version of SQLite, pay very
+close attention to whether the change is still doing what is intended.
+
+Original review URLs:
+https://codereview.chromium.org/159044
+https://codereview.chromium.org/384075
+https://codereview.chromium.org/377039
+[Possibly not a complete list.]
+---
+ third_party/sqlite/src/src/os_unix.c | 98 +++++++++++++++++++++++++++++-------
+ third_party/sqlite/src/src/os_win.c | 7 +++
+ 2 files changed, 88 insertions(+), 17 deletions(-)
+
+diff --git a/third_party/sqlite/src/src/os_unix.c b/third_party/sqlite/src/src/os_unix.c
+index 998e353..766b52a 100644
+--- a/third_party/sqlite/src/src/os_unix.c
++++ b/third_party/sqlite/src/src/os_unix.c
+@@ -4418,9 +4418,16 @@ typedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);
*/
/*
@@ -25,7 +43,7 @@ index ef04a72..e5e1509 100644
sqlite3_vfs *pVfs, /* Pointer to vfs object */
int h, /* Open file descriptor of file being opened */
int dirfd, /* Directory file descriptor */
-@@ -3812,6 +3819,73 @@ static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
+@@ -4834,6 +4841,73 @@ static int findCreateFileMode(
}
/*
@@ -99,8 +117,8 @@ index ef04a72..e5e1509 100644
** Open the file zPath.
**
** Previously, the SQLite OS layer used three functions in place of this
-@@ -3893,20 +3967,13 @@ static int unixOpen(
- || eType==SQLITE_OPEN_TRANSIENT_DB
+@@ -4921,20 +4995,13 @@ static int unixOpen(
+ || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
);
- memset(p, 0, sizeof(unixFile));
@@ -124,7 +142,7 @@ index ef04a72..e5e1509 100644
}else if( !zName ){
/* If zName is NULL, the upper layer is requesting a temp file. */
assert(isDelete && !isOpenDirectory);
-@@ -3949,10 +4016,7 @@ static int unixOpen(
+@@ -4984,10 +5051,7 @@ static int unixOpen(
*pOutFlags = flags;
}
@@ -136,8 +154,8 @@ index ef04a72..e5e1509 100644
if( isDelete ){
#if OS_VXWORKS
-@@ -4028,7 +4092,7 @@ static int unixOpen(
- rc = fillInUnixFile(pVfs, fd, dirfd, pFile, zPath, noLock, isDelete);
+@@ -5090,7 +5154,7 @@ static int unixOpen(
+ isDelete, isReadonly);
open_finished:
if( rc!=SQLITE_OK ){
- sqlite3_free(p->pUnused);
@@ -145,11 +163,11 @@ index ef04a72..e5e1509 100644
}
return rc;
}
-diff --git src/os_win.c src/os_win.c
-index bc03a4b..06539d7 100644
---- src/os_win.c
-+++ src/os_win.c
-@@ -1890,4 +1890,11 @@ int sqlite3_os_end(void){
+diff --git a/third_party/sqlite/src/src/os_win.c b/third_party/sqlite/src/src/os_win.c
+index c876833..78e58b5 100644
+--- a/third_party/sqlite/src/src/os_win.c
++++ b/third_party/sqlite/src/src/os_win.c
+@@ -2784,4 +2784,11 @@ int sqlite3_os_end(void){
return SQLITE_OK;
}
@@ -161,3 +179,6 @@ index bc03a4b..06539d7 100644
+}
+
#endif /* SQLITE_OS_WIN */
+--
+2.2.1
+

Powered by Google App Engine
This is Rietveld 408576698