Commit 51a66d59 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Use the same sqlite header configuration in all of webdatabase

Some of third_party/WebKit/Source/webdatabase uses sqlite withq
internals exposed and some uses it with internals not exposed. That
mismatch causes issues in jumbo builds since it compiles several files
together and need headers to say the same thing.

This changes webdatabase so that it all compile with the
CHROMIUM_SQLITE_INTERNALS define set.

R=michaeln@chromium.org

Bug: 740542
Change-Id: I0b5c66fde7d191afd7a7143ef32c9c6f1b21b9e2
Reviewed-on: https://chromium-review.googlesource.com/565502Reviewed-by: default avatarMichael Nordman <michaeln@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#485558}
parent d064903d
......@@ -80,4 +80,7 @@ blink_modules_sources("webdatabase") {
} else if (is_posix) {
sources += [ "sqlite/SQLiteFileSystemPosix.cpp" ]
}
# Expose chromium_sqlite3_* functions from Chromium's patched SQLite.
defines = [ "CHROMIUM_SQLITE_INTERNALS" ] # So that sqlite3.h is not included without this set.
}
......@@ -47,11 +47,14 @@ SQLiteDatabase::SQLiteDatabase()
: db_(0),
page_size_(-1),
transaction_in_progress_(false),
#if DCHECK_IS_ON()
sharable_(false),
#endif
opening_thread_(0),
open_error_(SQLITE_ERROR),
open_error_message_(),
last_changes_count_(0) {}
last_changes_count_(0) {
}
SQLiteDatabase::~SQLiteDatabase() {
Close();
......
......@@ -96,7 +96,9 @@ class SQLiteDatabase {
const char* LastErrorMsg();
sqlite3* Sqlite3Handle() const {
#if DCHECK_IS_ON()
DCHECK_EQ(sharable_ || CurrentThread(), opening_thread_ || !db_);
#endif
return db_;
}
......@@ -138,7 +140,9 @@ class SQLiteDatabase {
int page_size_;
bool transaction_in_progress_;
#if DCHECK_IS_ON()
bool sharable_;
#endif
Mutex authorizer_lock_;
CrossThreadPersistent<DatabaseAuthorizer> authorizer_;
......
......@@ -28,9 +28,6 @@
* 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 "modules/webdatabase/sqlite/SQLiteFileSystem.h"
#include "public/platform/Platform.h"
......
......@@ -28,9 +28,6 @@
* 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 "modules/webdatabase/sqlite/SQLiteFileSystem.h"
#include <windows.h>
......
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