Windows build fix - move ThreadCondition implementation from WebCore to WTF.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Feb 2008 21:52:07 +0000 (21:52 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Feb 2008 21:52:07 +0000 (21:52 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/wtf/ThreadingWin.cpp
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/platform/win/ThreadConditionWin.cpp [deleted file]

index ea47a6330db9e7be25c7251efc15d58c74cd5378..441a8b05b8b5b490234f100ab615dea9db2077d3 100644 (file)
@@ -1,3 +1,14 @@
+2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
+
+        Windows build fix - move ThreadCondition implementation from WebCore to WTF.
+
+        * wtf/ThreadingWin.cpp:
+        (WTF::ThreadCondition::ThreadCondition):
+        (WTF::ThreadCondition::~ThreadCondition):
+        (WTF::ThreadCondition::wait):
+        (WTF::ThreadCondition::signal):
+        (WTF::ThreadCondition::broadcast):
+
 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
 
         Touch some files, hoping that Windows build bot will create JSC headers.
index 46dff939cf8312b3118983ae259ad837ce4fa65b..c946313869110169b04a65776608a21d4a69b2be 100644 (file)
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * =============================================================================
+ * Note:  The implementation of condition variables under the Windows
+ * plaform was based on that of the excellent BOOST C++ library.  It
+ * has been rewritten to fit in with the WebKit architecture and to
+ * use its coding conventions.
+ * =============================================================================
+ *
+ * The Boost license is virtually identical to the Apple variation at the
+ * top of this file, but is included here for completeness:
+ *
+ * Boost Software License - Version 1.0 - August 17th, 2003
+ *
+ * Permission is hereby granted, free of charge, to any person or organization
+ * obtaining a copy of the software and accompanying documentation covered by
+ * this license (the "Software") to use, reproduce, display, distribute,
+ * execute, and transmit the Software, and to prepare derivative works of the
+ * Software, and to permit third-parties to whom the Software is furnished to
+ * do so, all subject to the following:
+ *
+ * The copyright notices in the Software and this entire statement, including
+ * the above license grant, this restriction and the following disclaimer,
+ * must be included in all copies of the Software, in whole or in part, and
+ * all derivative works of the Software, unless such copies or derivative
+ * works are solely in the form of machine-executable object code generated by
+ * a source language processor.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+ * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #include "config.h"
@@ -164,4 +198,173 @@ void Mutex::unlock()
     ::LeaveCriticalSection(&m_mutex.m_internalMutex);
 }
 
+static const long MaxSemaphoreCount = static_cast<long>(~0UL >> 1);
+
+ThreadCondition::ThreadCondition()
+{
+    m_condition.m_timedOut = 0;
+    m_condition.m_blocked = 0;
+    m_condition.m_waitingForRemoval = 0;
+    m_condition.m_gate = ::CreateSemaphore(0, 1, 1, 0);
+    m_condition.m_queue = ::CreateSemaphore(0, 0, MaxSemaphoreCount, 0);
+    m_condition.m_mutex = ::CreateMutex(0, 0, 0);
+
+    if (!m_condition.m_gate || !m_condition.m_queue || !m_condition.m_mutex) {
+        if (m_condition.m_gate)
+            ::CloseHandle(m_condition.m_gate);
+        if (m_condition.m_queue)
+            ::CloseHandle(m_condition.m_queue);
+        if (m_condition.m_mutex)
+            ::CloseHandle(m_condition.m_mutex);
+    }
+}
+
+ThreadCondition::~ThreadCondition()
+{
+    ::CloseHandle(m_condition.m_gate);
+    ::CloseHandle(m_condition.m_queue);
+    ::CloseHandle(m_condition.m_mutex);
+}
+    
+void ThreadCondition::wait(Mutex& mutex)
+{
+    PlatformMutex& cs = mutex.impl();
+
+    // Enter the wait state.
+    DWORD res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
+    ASSERT(res == WAIT_OBJECT_0);
+    ++m_condition.m_blocked;
+    res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
+    ASSERT(res);
+
+    ::LeaveCriticalSection(&cs.m_internalMutex);
+
+    res = ::WaitForSingleObject(m_condition.m_queue, INFINITE);
+    ASSERT(res == WAIT_OBJECT_0);
+
+    res = ::WaitForSingleObject(m_condition.m_mutex, INFINITE);
+    ASSERT(res == WAIT_OBJECT_0);
+    size_t wasWaiting = m_condition.m_waitingForRemoval;
+    size_t wasTimedOut = m_condition.m_timedOut;
+    if (wasWaiting != 0) {
+        if (--m_condition.m_waitingForRemoval == 0) {
+            if (m_condition.m_blocked != 0) {
+                res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);  // open m_gate
+                ASSERT(res);
+                wasWaiting = 0;
+            }
+            else if (m_condition.m_timedOut != 0)
+                m_condition.m_timedOut = 0;
+        }
+    } else if (++m_condition.m_timedOut == ((std::numeric_limits<unsigned>::max)() / 2)) {
+        // timeout occured, normalize the m_condition.m_timedOut count
+        // this may occur if many calls to wait with a timeout are made and
+        // no call to notify_* is made
+        res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
+        ASSERT(res == WAIT_OBJECT_0);
+        m_condition.m_blocked -= m_condition.m_timedOut;
+        res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
+        ASSERT(res);
+        m_condition.m_timedOut = 0;
+    }
+    res = ::ReleaseMutex(m_condition.m_mutex);
+    ASSERT(res);
+
+    if (wasWaiting == 1) {
+        for (/**/ ; wasTimedOut; --wasTimedOut) {
+            // better now than spurious later
+            res = ::WaitForSingleObject(m_condition.m_queue, INFINITE);
+            ASSERT(res == WAIT_OBJECT_0);
+        }
+        res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
+        ASSERT(res);
+    }
+
+    ::EnterCriticalSection (&cs.m_internalMutex);
+}
+
+void ThreadCondition::signal()
+{
+    unsigned signals = 0;
+
+    DWORD res = ::WaitForSingleObject(m_condition.m_mutex, INFINITE);
+    ASSERT(res == WAIT_OBJECT_0);
+
+    if (m_condition.m_waitingForRemoval != 0) { // the m_gate is already closed
+        if (m_condition.m_blocked == 0) {
+            res = ::ReleaseMutex(m_condition.m_mutex);
+            ASSERT(res);
+            return;
+        }
+
+        ++m_condition.m_waitingForRemoval;
+        --m_condition.m_blocked;
+
+        signals = 1;
+    } else {
+        res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
+        ASSERT(res == WAIT_OBJECT_0);
+        if (m_condition.m_blocked > m_condition.m_timedOut) {
+            if (m_condition.m_timedOut != 0) {
+                m_condition.m_blocked -= m_condition.m_timedOut;
+                m_condition.m_timedOut = 0;
+            }
+            signals = m_condition.m_waitingForRemoval = 1;
+            --m_condition.m_blocked;
+        } else {
+            res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
+            ASSERT(res);
+        }
+    }
+
+    res =::ReleaseMutex(m_condition.m_mutex);
+    ASSERT(res);
+
+    if (signals) {
+        res = ::ReleaseSemaphore(m_condition.m_queue, signals, 0);
+        ASSERT(res);
+    }
+}
+
+void ThreadCondition::broadcast()
+{
+    unsigned signals = 0;
+
+    WORD res = ::WaitForSingleObject(m_condition.m_mutex, INFINITE);
+    ASSERT(res == WAIT_OBJECT_0);
+
+    if (m_condition.m_waitingForRemoval != 0) { // the m_gate is already closed
+        if (m_condition.m_blocked == 0) {
+            res = ::ReleaseMutex(m_condition.m_mutex);
+            ASSERT(res);
+            return;
+        }
+
+        m_condition.m_waitingForRemoval += (signals = m_condition.m_blocked);
+        m_condition.m_blocked = 0;
+    } else {
+        res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
+        ASSERT(res == WAIT_OBJECT_0);
+        if (m_condition.m_blocked > m_condition.m_timedOut) {
+            if (m_condition.m_timedOut != 0) {
+                m_condition.m_blocked -= m_condition.m_timedOut;
+                m_condition.m_timedOut = 0;
+            }
+            signals = m_condition.m_waitingForRemoval = m_condition.m_blocked;
+            m_condition.m_blocked = 0;
+        } else {
+            res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
+            ASSERT(res);
+        }
+    }
+
+    res = ::ReleaseMutex(m_condition.m_mutex);
+    ASSERT(res);
+
+    if (signals) {
+        res = ::ReleaseSemaphore(m_condition.m_queue, signals, 0);
+        ASSERT(res);
+    }
+}
+
 } // namespace WTF
index 561ffeaee4262b0b4a25988634017088954d950b..6d307fa604a4f56962b1b81d571b2ad04e66d5b2 100644 (file)
@@ -1,3 +1,10 @@
+2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
+
+        Windows build fix - move ThreadCondition implementation from WebCore to WTF.
+
+        * WebCore.vcproj/WebCore.vcproj:
+        * platform/win/ThreadConditionWin.cpp: Removed.
+
 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 899d0fefea83cad682ac8dddcbaadbef734bc5a3..5fa805ccc3d6052358fe371842fa0e65045c5c93 100644 (file)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
+<?xml version="1.0" encoding="windows-1251"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="8.00"\r
+       Version="8,00"\r
        Name="WebCore"\r
        ProjectGUID="{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"\r
        RootNamespace="WebCore"\r
                                        RelativePath="..\platform\win\MIMETypeRegistryWin.cpp"\r
                                        >\r
                                </File>\r
-                               <File\r
-                                       RelativePath="..\platform\win\MutexWin.cpp"\r
-                                       >\r
-                               </File>\r
                                <File\r
                                        RelativePath="..\platform\win\PasteboardWin.cpp"\r
                                        >\r
                                        RelativePath="..\platform\win\TemporaryLinkStubs.cpp"\r
                                        >\r
                                </File>\r
-                               <File\r
-                                       RelativePath="..\platform\win\ThreadConditionWin.cpp"\r
-                                       >\r
-                               </File>\r
                                <File\r
                                        RelativePath="..\platform\win\WCDataObject.cpp"\r
                                        >\r
                                        RelativePath="..\bindings\js\JSAudioConstructor.h"\r
                                        >\r
                                </File>\r
+                               <File\r
+                                       RelativePath="..\bindings\js\JSCanvasPixelArrayCustom.cpp"\r
+                                       >\r
+                               </File>\r
                                <File\r
                                        RelativePath="..\bindings\js\JSCanvasRenderingContext2DCustom.cpp"\r
                                        >\r
                                        RelativePath="..\bindings\js\JSHTMLSelectElementCustom.h"\r
                                        >\r
                                </File>\r
-                               <File\r
-                                       RelativePath="..\bindings\js\JSCanvasPixelArrayCustom.cpp"\r
-                                       >\r
-                               </File>\r
                                <File\r
                                        RelativePath="..\bindings\js\JSLocation.cpp"\r
                                        >\r
diff --git a/WebCore/platform/win/ThreadConditionWin.cpp b/WebCore/platform/win/ThreadConditionWin.cpp
deleted file mode 100644 (file)
index f2bdb78..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * =============================================================================
- * Note:  The implementation of condition variables under the Windows
- * plaform was based on that of the excellent BOOST C++ library.  It
- * has been rewritten to fit in with the WebKit architecture and to
- * use its coding conventions.
- * =============================================================================
- *
- * The Boost license is virtually identical to the Apple variation at the
- * top of this file, but is included here for completeness:
- *
- * Boost Software License - Version 1.0 - August 17th, 2003
- *
- * Permission is hereby granted, free of charge, to any person or organization
- * obtaining a copy of the software and accompanying documentation covered by
- * this license (the "Software") to use, reproduce, display, distribute,
- * execute, and transmit the Software, and to prepare derivative works of the
- * Software, and to permit third-parties to whom the Software is furnished to
- * do so, all subject to the following:
- *
- * The copyright notices in the Software and this entire statement, including
- * the above license grant, this restriction and the following disclaimer,
- * must be included in all copies of the Software, in whole or in part, and
- * all derivative works of the Software, unless such copies or derivative
- * works are solely in the form of machine-executable object code generated by
- * a source language processor.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
- * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include "config.h"
-#include "Logging.h"
-#include "Threading.h"
-#include <limits>
-#include <errno.h>
-
-namespace WebCore {
-
-static const long MaxSemaphoreCount = static_cast<long>(~0UL >> 1);
-
-ThreadCondition::ThreadCondition()
-{
-    m_condition.m_timedOut = 0;
-    m_condition.m_blocked = 0;
-    m_condition.m_waitingForRemoval = 0;
-    m_condition.m_gate = ::CreateSemaphore(0, 1, 1, 0);
-    m_condition.m_queue = ::CreateSemaphore(0, 0, MaxSemaphoreCount, 0);
-    m_condition.m_mutex = ::CreateMutex(0, 0, 0);
-
-    if (!m_condition.m_gate || !m_condition.m_queue || !m_condition.m_mutex) {
-        if (m_condition.m_gate)
-            ::CloseHandle(m_condition.m_gate);
-        if (m_condition.m_queue)
-            ::CloseHandle(m_condition.m_queue);
-        if (m_condition.m_mutex)
-            ::CloseHandle(m_condition.m_mutex);
-    }
-}
-
-ThreadCondition::~ThreadCondition()
-{
-    ::CloseHandle(m_condition.m_gate);
-    ::CloseHandle(m_condition.m_queue);
-    ::CloseHandle(m_condition.m_mutex);
-}
-    
-void ThreadCondition::wait(Mutex& mutex)
-{
-    PlatformMutex& cs = mutex.impl();
-
-    // Enter the wait state.
-    DWORD res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
-    ASSERT(res == WAIT_OBJECT_0);
-    ++m_condition.m_blocked;
-    res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
-    ASSERT(res);
-
-    ::LeaveCriticalSection(&cs.m_internalMutex);
-
-    res = ::WaitForSingleObject(m_condition.m_queue, INFINITE);
-    ASSERT(res == WAIT_OBJECT_0);
-
-    res = ::WaitForSingleObject(m_condition.m_mutex, INFINITE);
-    ASSERT(res == WAIT_OBJECT_0);
-    size_t wasWaiting = m_condition.m_waitingForRemoval;
-    size_t wasTimedOut = m_condition.m_timedOut;
-    if (wasWaiting != 0) {
-        if (--m_condition.m_waitingForRemoval == 0) {
-            if (m_condition.m_blocked != 0) {
-                res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);  // open m_gate
-                ASSERT(res);
-                wasWaiting = 0;
-            }
-            else if (m_condition.m_timedOut != 0)
-                m_condition.m_timedOut = 0;
-        }
-    } else if (++m_condition.m_timedOut == ((std::numeric_limits<unsigned>::max)() / 2)) {
-        // timeout occured, normalize the m_condition.m_timedOut count
-        // this may occur if many calls to wait with a timeout are made and
-        // no call to notify_* is made
-        res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
-        ASSERT(res == WAIT_OBJECT_0);
-        m_condition.m_blocked -= m_condition.m_timedOut;
-        res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
-        ASSERT(res);
-        m_condition.m_timedOut = 0;
-    }
-    res = ::ReleaseMutex(m_condition.m_mutex);
-    ASSERT(res);
-
-    if (wasWaiting == 1) {
-        for (/**/ ; wasTimedOut; --wasTimedOut) {
-            // better now than spurious later
-            res = ::WaitForSingleObject(m_condition.m_queue, INFINITE);
-            ASSERT(res == WAIT_OBJECT_0);
-        }
-        res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
-        ASSERT(res);
-    }
-
-    ::EnterCriticalSection (&cs.m_internalMutex);
-}
-
-void ThreadCondition::signal()
-{
-    unsigned signals = 0;
-
-    DWORD res = ::WaitForSingleObject(m_condition.m_mutex, INFINITE);
-    ASSERT(res == WAIT_OBJECT_0);
-
-    if (m_condition.m_waitingForRemoval != 0) { // the m_gate is already closed
-        if (m_condition.m_blocked == 0) {
-            res = ::ReleaseMutex(m_condition.m_mutex);
-            ASSERT(res);
-            return;
-        }
-
-        ++m_condition.m_waitingForRemoval;
-        --m_condition.m_blocked;
-
-        signals = 1;
-    } else {
-        res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
-        ASSERT(res == WAIT_OBJECT_0);
-        if (m_condition.m_blocked > m_condition.m_timedOut) {
-            if (m_condition.m_timedOut != 0) {
-                m_condition.m_blocked -= m_condition.m_timedOut;
-                m_condition.m_timedOut = 0;
-            }
-            signals = m_condition.m_waitingForRemoval = 1;
-            --m_condition.m_blocked;
-        } else {
-            res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
-            ASSERT(res);
-        }
-    }
-
-    res =::ReleaseMutex(m_condition.m_mutex);
-    ASSERT(res);
-
-    if (signals) {
-        res = ::ReleaseSemaphore(m_condition.m_queue, signals, 0);
-        ASSERT(res);
-    }
-}
-
-void ThreadCondition::broadcast()
-{
-    unsigned signals = 0;
-
-    WORD res = ::WaitForSingleObject(m_condition.m_mutex, INFINITE);
-    ASSERT(res == WAIT_OBJECT_0);
-
-    if (m_condition.m_waitingForRemoval != 0) { // the m_gate is already closed
-        if (m_condition.m_blocked == 0) {
-            res = ::ReleaseMutex(m_condition.m_mutex);
-            ASSERT(res);
-            return;
-        }
-
-        m_condition.m_waitingForRemoval += (signals = m_condition.m_blocked);
-        m_condition.m_blocked = 0;
-    } else {
-        res = ::WaitForSingleObject(m_condition.m_gate, INFINITE);
-        ASSERT(res == WAIT_OBJECT_0);
-        if (m_condition.m_blocked > m_condition.m_timedOut) {
-            if (m_condition.m_timedOut != 0) {
-                m_condition.m_blocked -= m_condition.m_timedOut;
-                m_condition.m_timedOut = 0;
-            }
-            signals = m_condition.m_waitingForRemoval = m_condition.m_blocked;
-            m_condition.m_blocked = 0;
-        } else {
-            res = ::ReleaseSemaphore(m_condition.m_gate, 1, 0);
-            ASSERT(res);
-        }
-    }
-
-    res = ::ReleaseMutex(m_condition.m_mutex);
-    ASSERT(res);
-
-    if (signals) {
-        res = ::ReleaseSemaphore(m_condition.m_queue, signals, 0);
-        ASSERT(res);
-    }
-}
-    
-} // namespace WebCore