[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
dumi at chromium.org
dumi at chromium.org
Wed Mar 17 18:14:01 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 156b3733efae03e4069f0fcbb681347f3fda98ba
Author: dumi at chromium.org <dumi at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 4 01:01:23 2010 +0000
Fix a bug that could lead to a crash. Some parts of
SQLTransaction::checkAndHandleClosedDatabase() should only be run
when that method is invoked on the DB thread.
Reviewed by Dimitri Glazkov.
We cannot test this fix with a test, because the crash happens
only when all of the following conditions are met:
1. A database is closing.
2. A transaction on that database is in progress.
3. The transaction is in a state where a statement/transaction
success/error callback needs to be invoked (so there's a task for
this transaction pending on the main thread).
4. The DB thread finished processing all its tasks and called
SQLTransactionCoordinator::shutdown() before the main thread go to
that task.
The closest thing we have to a test is running
LayoutTests/storage/database-lock-after-reload.html 1000 times in
a row. Without the patch, the probability of a crash happening in
one of the runs is very high. With the patch, the test should
reliably run 1000 times in a row without a single crash.
https://bugs.webkit.org/show_bug.cgi?id=35624
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::checkAndHandleClosedDatabase):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8ff8eb5..f0dc236 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,33 @@
+2010-03-02 Dumitru Daniliuc <dumi at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Fix a bug that could lead to a crash. Some parts of
+ SQLTransaction::checkAndHandleClosedDatabase() should only be run
+ when that method is invoked on the DB thread.
+
+ We cannot test this fix with a test, because the crash happens
+ only when all of the following conditions are met:
+ 1. A database is closing.
+ 2. A transaction on that database is in progress.
+ 3. The transaction is in a state where a statement/transaction
+ success/error callback needs to be invoked (so there's a task for
+ this transaction pending on the main thread).
+ 4. The DB thread finished processing all its tasks and called
+ SQLTransactionCoordinator::shutdown() before the main thread go to
+ that task.
+
+ The closest thing we have to a test is running
+ LayoutTests/storage/database-lock-after-reload.html 1000 times in
+ a row. Without the patch, the probability of a crash happening in
+ one of the runs is very high. With the patch, the test should
+ reliably run 1000 times in a row without a single crash.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35624
+
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::checkAndHandleClosedDatabase):
+
2010-03-03 Darin Fisher <darin at chromium.org>
Reviewed by Mark Rowe.
diff --git a/WebCore/storage/SQLTransaction.cpp b/WebCore/storage/SQLTransaction.cpp
index 754cebc..a7c2558 100644
--- a/WebCore/storage/SQLTransaction.cpp
+++ b/WebCore/storage/SQLTransaction.cpp
@@ -158,6 +158,10 @@ void SQLTransaction::checkAndHandleClosedDatabase()
m_statementQueue.clear();
m_nextStep = 0;
+ // The next steps should be executed only if we're on the DB thread.
+ if (currentThread() != database()->scriptExecutionContext()->databaseThread()->getThreadID())
+ return;
+
// The current SQLite transaction should be stopped, as well
if (m_sqliteTransaction) {
m_sqliteTransaction->stop();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list