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

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

Issue 2019963002: Remove get from CrossThreadPersistent to avoid accidental use Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/DatabaseThread.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
index 0fe57779d626c97a50d2be7e6cbd5196211625da..505a7e18ca751cae68c2c038cc83da88211093e3 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
@@ -153,6 +153,14 @@ bool DatabaseThread::isDatabaseOpen(Database* database)
return !m_terminationRequested && m_openDatabaseSet.contains(database);
}
+bool DatabaseThread::isDatabaseOpen(CrossThreadPersistent<Database> database)
+{
+ DCHECK(isDatabaseThread());
+ DCHECK(database);
+ MutexLocker lock(m_terminationRequestedMutex);
+ return !m_terminationRequested && m_openDatabaseSet.contains(database);
+}
+
bool DatabaseThread::isDatabaseThread() const
{
// This function is called only from the main thread or the database

Powered by Google App Engine
This is Rietveld 408576698