[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
eric at webkit.org
eric at webkit.org
Wed Mar 17 17:58:49 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit b242b9b39efc12730f17cc3566be4cc4e8967742
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 25 03:51:10 2010 +0000
2010-02-24 Jochen Eisinger <jochen at chromium.org>
Reviewed by Jeremy Orlow.
Expose Database object of currently active task on the database thread
https://bugs.webkit.org/show_bug.cgi?id=35341
* storage/DatabaseThread.cpp:
(WebCore::DatabaseThread::DatabaseThread):
(WebCore::DatabaseThread::databaseThread):
* storage/DatabaseThread.h:
(WebCore::DatabaseThread::getDatabaseOfCurrentTask):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 388ec22..6ab318f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-24 Jochen Eisinger <jochen at chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Expose Database object of currently active task on the database thread
+ https://bugs.webkit.org/show_bug.cgi?id=35341
+
+ * storage/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ (WebCore::DatabaseThread::databaseThread):
+ * storage/DatabaseThread.h:
+ (WebCore::DatabaseThread::getDatabaseOfCurrentTask):
+
2010-02-24 Nicholas Young <nicholas.young at nokia.com>
Reviewed by Eric Carlson.
diff --git a/WebCore/storage/DatabaseThread.cpp b/WebCore/storage/DatabaseThread.cpp
index ec4c6d1..65092f1 100644
--- a/WebCore/storage/DatabaseThread.cpp
+++ b/WebCore/storage/DatabaseThread.cpp
@@ -42,6 +42,7 @@ namespace WebCore {
DatabaseThread::DatabaseThread()
: m_threadID(0)
+ , m_databaseOfCurrentTask(0)
, m_transactionClient(new SQLTransactionClient())
, m_transactionCoordinator(new SQLTransactionCoordinator())
, m_cleanupSync(0)
@@ -96,7 +97,10 @@ void* DatabaseThread::databaseThread()
AutodrainedPool pool;
while (OwnPtr<DatabaseTask> task = m_queue.waitForMessage()) {
+ ASSERT(!m_databaseOfCurrentTask);
+ m_databaseOfCurrentTask = task->database();
task->performTask();
+ m_databaseOfCurrentTask = 0;
pool.cycle();
}
diff --git a/WebCore/storage/DatabaseThread.h b/WebCore/storage/DatabaseThread.h
index 3702619..daf2a9e 100644
--- a/WebCore/storage/DatabaseThread.h
+++ b/WebCore/storage/DatabaseThread.h
@@ -64,6 +64,7 @@ public:
void recordDatabaseOpen(Database*);
void recordDatabaseClosed(Database*);
ThreadIdentifier getThreadID() { return m_threadID; }
+ Database* getDatabaseOfCurrentTask() { return m_databaseOfCurrentTask; }
SQLTransactionClient* transactionClient() { return m_transactionClient.get(); }
SQLTransactionCoordinator* transactionCoordinator() { return m_transactionCoordinator.get(); }
@@ -80,6 +81,8 @@ private:
MessageQueue<DatabaseTask> m_queue;
+ Database* m_databaseOfCurrentTask;
+
// This set keeps track of the open databases that have been used on this thread.
typedef HashSet<RefPtr<Database> > DatabaseSet;
DatabaseSet m_openDatabaseSet;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list