Changeset 88235 in webkit


Ignore:
Timestamp:
Jun 7, 2011 7:27:02 AM (13 years ago)
Author:
yurys@chromium.org
Message:

2011-06-03 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

[Chromium] Web Inspector: correctly handle disconnect from worker when script execution is paused
https://bugs.webkit.org/show_bug.cgi?id=62019

Dispatch disconnecFrontend message in debugger task mode to make sure
it is processed even if execution is paused.

  • bindings/v8/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause): (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause):
  • bindings/v8/WorkerScriptDebugServer.h:

2011-06-03 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

[Chromium] Web Inspector: correctly handle disconnect from worker when script execution is paused
https://bugs.webkit.org/show_bug.cgi?id=62019

Dispatch disconnecFrontend message in debugger task mode to make sure
it is processed even if execution is paused.

  • src/WebWorkerImpl.cpp: (WebKit::WebWorkerImpl::detachDevTools): (WebKit::WebWorkerImpl::dispatchDevToolsMessage):
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88234 r88235  
     12011-06-03  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        [Chromium] Web Inspector: correctly handle disconnect from worker when script execution is paused
     6        https://bugs.webkit.org/show_bug.cgi?id=62019
     7
     8        Dispatch disconnecFrontend message in debugger task mode to make sure
     9        it is processed even if execution is paused.
     10
     11        * bindings/v8/WorkerScriptDebugServer.cpp:
     12        (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause):
     13        (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause):
     14        * bindings/v8/WorkerScriptDebugServer.h:
     15
    1162011-06-07  Felician Marton  <marton.felician.zoltan@stud.u-szeged.hu>
    217
  • trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp

    r83874 r88235  
    6565    return 0;
    6666}
     67
     68const char* WorkerScriptDebugServer::debuggerTaskMode = "debugger";
    6769
    6870WorkerScriptDebugServer::WorkerScriptDebugServer()
     
    133135    MessageQueueWaitResult result;
    134136    do {
    135         result = workerThread->runLoop().runInMode(workerContext, "debugger");
     137        result = workerThread->runLoop().runInMode(workerContext, debuggerTaskMode);
    136138    // Keep waiting until execution is resumed.
    137139    } while (result == MessageQueueMessageReceived && isPaused());
     
    145147void WorkerScriptDebugServer::quitMessageLoopOnPause()
    146148{
    147     // FIXME: do exit nested loop when listener is removed on pause.
     149    // Nothing to do here in case of workers since runMessageLoopOnPause will check for paused state after each debugger command.
    148150}
    149151
  • trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.h

    r83874 r88235  
    4949    void removeListener(ScriptDebugListener*, WorkerContext*);
    5050
     51    static const char* debuggerTaskMode;
     52
    5153private:
    5254    virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Context>);
  • trunk/Source/WebKit/chromium/ChangeLog

    r88232 r88235  
     12011-06-03  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        [Chromium] Web Inspector: correctly handle disconnect from worker when script execution is paused
     6        https://bugs.webkit.org/show_bug.cgi?id=62019
     7
     8        Dispatch disconnecFrontend message in debugger task mode to make sure
     9        it is processed even if execution is paused.
     10
     11        * src/WebWorkerImpl.cpp:
     12        (WebKit::WebWorkerImpl::detachDevTools):
     13        (WebKit::WebWorkerImpl::dispatchDevToolsMessage):
     14
    1152011-06-07  Naoki Takano  <takano.naoki@gmail.com>
    216
  • trunk/Source/WebKit/chromium/src/WebWorkerImpl.cpp

    r87074 r88235  
    4444#include "SubstituteData.h"
    4545#include "WorkerInspectorController.h"
     46#include "WorkerScriptDebugServer.h"
    4647#include <wtf/OwnPtr.h>
    4748#include <wtf/Threading.h>
     
    167168void WebWorkerImpl::detachDevTools()
    168169{
    169     workerThread()->runLoop().postTask(createCallbackTask(disconnectFromWorkerContextInspectorTask, true));
     170    workerThread()->runLoop().postTaskForMode(createCallbackTask(disconnectFromWorkerContextInspectorTask, true), WorkerScriptDebugServer::debuggerTaskMode);
    170171}
    171172
     
    178179void WebWorkerImpl::dispatchDevToolsMessage(const WebString& message)
    179180{
    180     workerThread()->runLoop().postTaskForMode(createCallbackTask(dispatchOnInspectorBackendTask, String(message)), "debugger");
     181    workerThread()->runLoop().postTaskForMode(createCallbackTask(dispatchOnInspectorBackendTask, String(message)), WorkerScriptDebugServer::debuggerTaskMode);
    181182}
    182183
Note: See TracChangeset for help on using the changeset viewer.