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

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: 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 73%
rename from third_party/sqlite/webdb.patch
rename to third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch
index 6a4e934f46561fb50e20e4a0b1146b53453d1155..1223140f3665ca120dfbd21b84da929a2a705a60 100644
--- a/third_party/sqlite/webdb.patch
+++ b/third_party/sqlite/patches/0006-Modify-default-VFS-to-support-WebDatabase.patch
@@ -1,13 +1,25 @@
-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 fbe968c746d928b8372ea354229aef6772606336 Mon Sep 17 00:00:00 2001
+From: Scott Hess <shess@chromium.org>
+Date: Tue, 16 Dec 2014 13:03:36 -0800
+Subject: [PATCH 06/24] 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.
+---
+ 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 +37,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 +111,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 +136,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 +148,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 +157,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 +173,6 @@ index bc03a4b..06539d7 100644
+}
+
#endif /* SQLITE_OS_WIN */
+--
+2.2.1
+

Powered by Google App Engine
This is Rietveld 408576698