[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jorlow at chromium.org jorlow at chromium.org
Wed Apr 7 23:15:32 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit ad4434a6035b831e8369a8f34a8f04a66d111796
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