JavaScriptCore:
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Feb 2009 22:37:17 +0000 (22:37 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Feb 2009 22:37:17 +0000 (22:37 +0000)
commitd424cf61c195c18b91054679c756bcf60db36db4
tree5c9e98b168e1a32a1818c7ccaf42dade7a0f244f
parentac7ec8c9a390b43ea0b77ec37c7d4c5dd0ef36b4
JavaScriptCore:

2009-02-23  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 24047: Need to simplify nested if's in WorkerRunLoop::runInMode
        <https://bugs.webkit.org/show_bug.cgi?id=24047>

        * wtf/MessageQueue.h:
        (WTF::MessageQueue::infiniteTime):
        Allows for one to call waitForMessageFilteredWithTimeout and wait forever.

        (WTF::MessageQueue::alwaysTruePredicate):
        (WTF::MessageQueue::waitForMessage):
        Made waitForMessage call waitForMessageFilteredWithTimeout, so that there is less
        duplicate code.

        (WTF::MessageQueue::waitForMessageFilteredWithTimeout):

        * wtf/ThreadingQt.cpp:
        (WTF::ThreadCondition::timedWait):
        * wtf/ThreadingWin.cpp:
        (WTF::ThreadCondition::timedWait):
        Made these two implementations consistent with the pthread and gtk implementations.
        Currently, the time calculations would overflow when passed large values.

WebCore:

2009-02-23  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 24047: Need to simplify nested if's in WorkerRunLoop::runInMode
        <https://bugs.webkit.org/show_bug.cgi?id=24047>

        Made a nested if inside of WorkerRunLoop::runInMode a lot simpler by
        using only MessageQueue::waitForMessageFilteredWithTimeout instead
        of three different MessageQueue methods.

        No observable change in behavior, so no test.

        * dom/WorkerRunLoop.cpp:
        (WebCore::ModePredicate::operator()):
        Minor clean-up to able to pass a const ref point for ModePredicate into runInMode.
        (WebCore::WorkerRunLoop::runInMode):
        * dom/WorkerRunLoop.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/MessageQueue.h
JavaScriptCore/wtf/ThreadingQt.cpp
JavaScriptCore/wtf/ThreadingWin.cpp
WebCore/ChangeLog
WebCore/dom/WorkerRunLoop.cpp
WebCore/dom/WorkerRunLoop.h