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

Unified Diff: third_party/WebKit/Source/modules/webdatabase/Database.cpp

Issue 1909813002: Enable per thread heap for database thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/WebKit/Source/modules/webdatabase/Database.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.cpp b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
index 61377d3b9af3ff74c9a99fb07555ef87ea18a190..2640d004bc9b13817e00eb0b64911d8f0e55ec43 100644
--- a/third_party/WebKit/Source/modules/webdatabase/Database.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
@@ -215,6 +215,7 @@ Database::Database(DatabaseContext* databaseContext, const String& name, const S
, m_transactionInProgress(false)
, m_isTransactionQueueEnabled(true)
{
+ DCHECK(isMainThread());
m_contextThreadSecurityOrigin = m_databaseContext->getSecurityOrigin()->isolatedCopy();
m_databaseAuthorizer = DatabaseAuthorizer::create(infoTableName);
@@ -254,7 +255,6 @@ DEFINE_TRACE(Database)
visitor->trace(m_databaseContext);
visitor->trace(m_sqliteDatabase);
visitor->trace(m_databaseAuthorizer);
- visitor->trace(m_transactionQueue);
}
bool Database::openAndVerifyVersion(bool setVersionInNewDatabase, DatabaseError& error, String& errorMessage)
@@ -411,7 +411,7 @@ public:
void setOpenSucceeded() { m_openSucceeded = true; }
private:
- Member<Database> m_database;
+ CrossThreadPersistent<Database> m_database;
bool m_openSucceeded;
};

Powered by Google App Engine
This is Rietveld 408576698