[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 11:25:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6fd8831000fe832dfd557646194d3a3eec9c0720
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 22 21:25:13 2010 +0000

    Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
    
    Fixes <http://webkit.org/b/42846> WorkQueue should detect
    ::WaitForMultipleObject failures
    
    Reviewed by Anders Carlsson.
    
    * Platform/win/WorkQueueWin.cpp:
    (WorkQueue::workQueueThreadBody): Added some assertions about the
    various things that can fail with ::WaitForMultipleObjects,
    specifically:
      - Passing too many objects
      - Timeouts (which shouldn't happen since we pass a timeout interval
        of INFINITE)
      - Abandoned mutexes (which shouldn't happen since we don't wait on
        any mutexes currently)
      - Miscellaneous failures
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f205b36..2f19d42 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-22  Adam Roben  <aroben at apple.com>
+
+        Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
+
+        Fixes <http://webkit.org/b/42846> WorkQueue should detect
+        ::WaitForMultipleObject failures
+
+        Reviewed by Anders Carlsson.
+
+        * Platform/win/WorkQueueWin.cpp:
+        (WorkQueue::workQueueThreadBody): Added some assertions about the
+        various things that can fail with ::WaitForMultipleObjects,
+        specifically:
+          - Passing too many objects
+          - Timeouts (which shouldn't happen since we pass a timeout interval
+            of INFINITE)
+          - Abandoned mutexes (which shouldn't happen since we don't wait on
+            any mutexes currently)
+          - Miscellaneous failures
+
 2010-07-22  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKit2/Platform/win/WorkQueueWin.cpp b/WebKit2/Platform/win/WorkQueueWin.cpp
index 5d0b586..92d734a 100644
--- a/WebKit2/Platform/win/WorkQueueWin.cpp
+++ b/WebKit2/Platform/win/WorkQueueWin.cpp
@@ -59,8 +59,19 @@ void WorkQueue::workQueueThreadBody()
         // Add the "perform work" event handle.
         handles.append(m_performWorkEvent);
 
+        ASSERT(handles.size() <= MAXIMUM_WAIT_OBJECTS);
+
         // Now we wait.
         DWORD result = ::WaitForMultipleObjects(handles.size(), handles.data(), FALSE, INFINITE);
+        if (result == WAIT_FAILED) {
+            DWORD error = ::GetLastError();
+            ASSERT_NOT_REACHED();
+        }
+
+        // The wait should never time out since we passed INFINITE for the timeout interval.
+        ASSERT(result != WAIT_TIMEOUT);
+        // We don't know how (or need) to handle abandoned mutexes yet.
+        ASSERT(result < WAIT_ABANDONED_0 || result >= WAIT_ABANDONED_0 + handles.size());
 
         if (result == handles.size() - 1)
             performWork();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list