2010-06-17 Fumitoshi Ukai <ukai@chromium.org>
authorukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jun 2010 04:30:17 +0000 (04:30 +0000)
committerukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jun 2010 04:30:17 +0000 (04:30 +0000)
commitc647eb6872d4dbc8727822712cd4ae80c40e4fc8
tree2812ae49e4fcf762fbd24f655b4bcc51821cc421
parentf97cb00145c5f354f5726f19a1a284ebac2b0250
2010-06-17  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Alexey Proskuryakov.

        WebSocket: resume should not process buffer if already processing.
        https://bugs.webkit.org/show_bug.cgi?id=39340

        Reviewed by Alexey Proskuryakov.

        * websocket/tests/alert-in-event-handler-expected.txt: Added.
        * websocket/tests/alert-in-event-handler.html: Added.
        * websocket/tests/script-tests/alert-in-event-handler.js: Added.
        * websocket/tests/send2_wsh.py: Added.
2010-06-17  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Alexey Proskuryakov.

        WebSocket: resume should not process buffer if already processing.
        https://bugs.webkit.org/show_bug.cgi?id=39340

        Test: websocket/tests/alert-in-event-handler.html

        While running an event handler of WebSocket object, it may be suspended
        and resumed in various reason. e.g. alert() will suspend/resume
        ActiveDOM objects. In chromium, sending IPC message would also
        suspend/resume ActiveDOM objects.
        If resume process pending buffer in this case, another event might
        be fired while running the initial event handler.
        Thus, resume should not process pending buffer immediately.
        Pending buffer would be processed after the current task has been
        finished.

        * websockets/ThreadableWebSocketChannelClientWrapper.h:
        * websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::WebSocketChannel):
        (WebCore::WebSocketChannel::resume):
         Just set one shot timer for resumeTimerFired() if not yet set.
        (WebCore::WebSocketChannel::resumeTimerFired):
         Process pending event after resume was called.
        * websockets/WebSocketChannel.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@61375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/websocket/tests/alert-in-event-handler-expected.txt [new file with mode: 0644]
LayoutTests/websocket/tests/alert-in-event-handler.html [new file with mode: 0644]
LayoutTests/websocket/tests/script-tests/alert-in-event-handler.js [new file with mode: 0644]
LayoutTests/websocket/tests/send2_wsh.py [new file with mode: 0644]
WebCore/ChangeLog
WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h
WebCore/websockets/WebSocketChannel.cpp
WebCore/websockets/WebSocketChannel.h