Commit 1843cb68 authored by shess@chromium.org's avatar shess@chromium.org

[sqlite] Remove WebDatabase externs and depend on what you use.

WebDatabase used an extern "C" section to declare the monkey-patching
symbols it uses from our patched SQLite VFS code.  Switch to the items
exported from sqlite3.h.

Additionally, various modules were satisfying an implicit dependency on
icu via SQLite's static library (SQLite needs it for the REGEXP override
in sqlite/src/ext/icu/icu.c).  Change the modules depending on the
sqlite library to also depend on icu, so that sqlite can work with
component build.

BUG=489444

Review URL: https://codereview.chromium.org/1311913002

git-svn-id: svn://svn.chromium.org/blink/trunk@201093 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7abb3cb8
...@@ -84,6 +84,7 @@ source_set("prerequisites") { ...@@ -84,6 +84,7 @@ source_set("prerequisites") {
"//skia", "//skia",
"//third_party/angle:translator", "//third_party/angle:translator",
"//third_party/iccjpeg", "//third_party/iccjpeg",
"//third_party/icu",
"//third_party/libpng", "//third_party/libpng",
"//third_party/libwebp", "//third_party/libwebp",
"//third_party/libxml", "//third_party/libxml",
......
...@@ -247,6 +247,8 @@ ...@@ -247,6 +247,8 @@
'<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/skia/skia.gyp:skia',
'<(angle_path)/src/angle.gyp:translator', '<(angle_path)/src/angle.gyp:translator',
'<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg', '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'<(DEPTH)/third_party/libpng/libpng.gyp:libpng', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
'<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp', '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml', '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
......
...@@ -43,6 +43,7 @@ source_set("modules") { ...@@ -43,6 +43,7 @@ source_set("modules") {
deps = [ deps = [
":make_modules_generated", ":make_modules_generated",
"//third_party/WebKit/Source/core", "//third_party/WebKit/Source/core",
"//third_party/icu",
"//third_party/sqlite", "//third_party/sqlite",
"//third_party/zlib", "//third_party/zlib",
] ]
......
...@@ -39,8 +39,10 @@ ...@@ -39,8 +39,10 @@
# GN version: //third_party/WebKit/Source/modules:modules # GN version: //third_party/WebKit/Source/modules:modules
'target_name': 'modules', 'target_name': 'modules',
'dependencies': [ 'dependencies': [
'<(DEPTH)/third_party/zlib/zlib.gyp:zlib', '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
'<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
'../config.gyp:config', '../config.gyp:config',
'modules_generated.gyp:make_modules_generated', 'modules_generated.gyp:make_modules_generated',
], ],
......
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
// Expose chromium_sqlite3_* functions from Chromium's patched SQLite.
#define CHROMIUM_SQLITE_INTERNALS
#include "config.h" #include "config.h"
#include "modules/webdatabase/sqlite/SQLiteFileSystem.h" #include "modules/webdatabase/sqlite/SQLiteFileSystem.h"
...@@ -38,15 +41,6 @@ ...@@ -38,15 +41,6 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
// Defined in Chromium's codebase in third_party/sqlite/src/os_unix.c
extern "C" {
void chromium_sqlite3_initialize_unix_sqlite3_file(sqlite3_file* file);
int chromium_sqlite3_fill_in_unix_sqlite3_file(sqlite3_vfs* vfs, int fd, int dirfd, sqlite3_file* file, const char* fileName, int noLock);
int chromium_sqlite3_get_reusable_file_handle(sqlite3_file* file, const char* fileName, int flags, int* fd);
void chromium_sqlite3_update_reusable_file_handle(sqlite3_file* file, int fd, int flags);
void chromium_sqlite3_destroy_reusable_file_handle(sqlite3_file* file);
}
namespace blink { namespace blink {
// Chromium's Posix implementation of SQLite VFS // Chromium's Posix implementation of SQLite VFS
......
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
// Expose chromium_sqlite3_* functions from Chromium's patched SQLite.
#define CHROMIUM_SQLITE_INTERNALS
#include "config.h" #include "config.h"
#include "modules/webdatabase/sqlite/SQLiteFileSystem.h" #include "modules/webdatabase/sqlite/SQLiteFileSystem.h"
...@@ -35,11 +38,6 @@ ...@@ -35,11 +38,6 @@
#include <sqlite3.h> #include <sqlite3.h>
#include "public/platform/Platform.h" #include "public/platform/Platform.h"
// Defined in Chromium's codebase in third_party/sqlite/src/os_win.c
extern "C" {
int chromium_sqlite3_initialize_win_sqlite3_file(sqlite3_file* file, HANDLE handle);
}
namespace blink { namespace blink {
// Chromium's Windows implementation of SQLite VFS // Chromium's Windows implementation of SQLite VFS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment