[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
jorlow at chromium.org
jorlow at chromium.org
Thu Dec 3 13:23:12 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 2f577154671d6618f6475e92ba95b12c6abc3927
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 29 23:22:33 2009 +0000
2009-10-29 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Darin Fisher.
DOM Storage's condition variable needs to handle spurious wakeups
https://bugs.webkit.org/show_bug.cgi?id=30920
Add a boolean to keep track of whether it's been terminated. Clean
up the locking code a tiny bit to make it easier to read. There's
no way to reproduce this reliably in a LayoutTest.
* storage/LocalStorageThread.cpp:
(WebCore::LocalStorageThread::LocalStorageThread):
(WebCore::LocalStorageThread::terminate):
(WebCore::LocalStorageThread::performTerminate):
* storage/LocalStorageThread.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0eac814..3843276 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-10-29 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ DOM Storage's condition variable needs to handle spurious wakeups
+ https://bugs.webkit.org/show_bug.cgi?id=30920
+
+ Add a boolean to keep track of whether it's been terminated. Clean
+ up the locking code a tiny bit to make it easier to read. There's
+ no way to reproduce this reliably in a LayoutTest.
+
+ * storage/LocalStorageThread.cpp:
+ (WebCore::LocalStorageThread::LocalStorageThread):
+ (WebCore::LocalStorageThread::terminate):
+ (WebCore::LocalStorageThread::performTerminate):
+ * storage/LocalStorageThread.h:
+
2009-10-29 Dimitri Glazkov <dglazkov at chromium.org>
Unreviewed, build fix.
diff --git a/WebCore/storage/LocalStorageThread.cpp b/WebCore/storage/LocalStorageThread.cpp
index 78640a9..9373232 100644
--- a/WebCore/storage/LocalStorageThread.cpp
+++ b/WebCore/storage/LocalStorageThread.cpp
@@ -40,6 +40,7 @@ PassRefPtr<LocalStorageThread> LocalStorageThread::create()
LocalStorageThread::LocalStorageThread()
: m_threadID(0)
+ , m_terminated(false)
{
m_selfRef = this;
}
@@ -108,11 +109,11 @@ void LocalStorageThread::terminate()
if (!m_threadID)
return;
- MutexLocker locker(m_terminateLock);
-
m_queue.append(LocalStorageTask::createTerminate(this));
- m_terminateCondition.wait(m_terminateLock);
+ MutexLocker locker(m_terminateLock);
+ while (!m_terminated)
+ m_terminateCondition.wait(m_terminateLock);
}
void LocalStorageThread::performTerminate()
@@ -122,6 +123,7 @@ void LocalStorageThread::performTerminate()
m_queue.kill();
MutexLocker locker(m_terminateLock);
+ m_terminated = true;
m_terminateCondition.signal();
}
diff --git a/WebCore/storage/LocalStorageThread.h b/WebCore/storage/LocalStorageThread.h
index e9e2b58..8fef35d 100644
--- a/WebCore/storage/LocalStorageThread.h
+++ b/WebCore/storage/LocalStorageThread.h
@@ -67,6 +67,7 @@ namespace WebCore {
Mutex m_terminateLock;
ThreadCondition m_terminateCondition;
+ bool m_terminated;
};
} // namespace WebCore
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list