Title: [88235] trunk/Source
- Revision
- 88235
- Author
- [email protected]
- Date
- 2011-06-07 07:27:02 -0700 (Tue, 07 Jun 2011)
Log Message
2011-06-03 Yury Semikhatsky <[email protected]>
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 <[email protected]>
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (88234 => 88235)
--- trunk/Source/WebCore/ChangeLog 2011-06-07 13:31:51 UTC (rev 88234)
+++ trunk/Source/WebCore/ChangeLog 2011-06-07 14:27:02 UTC (rev 88235)
@@ -1,3 +1,18 @@
+2011-06-03 Yury Semikhatsky <[email protected]>
+
+ 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-07 Felician Marton <[email protected]>
Reviewed by Nikolas Zimmermann.
Modified: trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp (88234 => 88235)
--- trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp 2011-06-07 13:31:51 UTC (rev 88234)
+++ trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp 2011-06-07 14:27:02 UTC (rev 88235)
@@ -65,6 +65,8 @@
return 0;
}
+const char* WorkerScriptDebugServer::debuggerTaskMode = "debugger";
+
WorkerScriptDebugServer::WorkerScriptDebugServer()
: ScriptDebugServer()
, m_pausedWorkerContext(0)
@@ -132,7 +134,7 @@
MessageQueueWaitResult result;
do {
- result = workerThread->runLoop().runInMode(workerContext, "debugger");
+ result = workerThread->runLoop().runInMode(workerContext, debuggerTaskMode);
// Keep waiting until execution is resumed.
} while (result == MessageQueueMessageReceived && isPaused());
m_pausedWorkerContext = 0;
@@ -144,7 +146,7 @@
void WorkerScriptDebugServer::quitMessageLoopOnPause()
{
- // FIXME: do exit nested loop when listener is removed on pause.
+ // Nothing to do here in case of workers since runMessageLoopOnPause will check for paused state after each debugger command.
}
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.h (88234 => 88235)
--- trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.h 2011-06-07 13:31:51 UTC (rev 88234)
+++ trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.h 2011-06-07 14:27:02 UTC (rev 88235)
@@ -48,6 +48,8 @@
void addListener(ScriptDebugListener*, WorkerContext*);
void removeListener(ScriptDebugListener*, WorkerContext*);
+ static const char* debuggerTaskMode;
+
private:
virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Context>);
virtual void runMessageLoopOnPause(v8::Handle<v8::Context>);
Modified: trunk/Source/WebKit/chromium/ChangeLog (88234 => 88235)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-06-07 13:31:51 UTC (rev 88234)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-06-07 14:27:02 UTC (rev 88235)
@@ -1,3 +1,17 @@
+2011-06-03 Yury Semikhatsky <[email protected]>
+
+ 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):
+
2011-06-07 Naoki Takano <[email protected]>
Reviewed by Kent Tamura.
Modified: trunk/Source/WebKit/chromium/src/WebWorkerImpl.cpp (88234 => 88235)
--- trunk/Source/WebKit/chromium/src/WebWorkerImpl.cpp 2011-06-07 13:31:51 UTC (rev 88234)
+++ trunk/Source/WebKit/chromium/src/WebWorkerImpl.cpp 2011-06-07 14:27:02 UTC (rev 88235)
@@ -43,6 +43,7 @@
#include "SerializedScriptValue.h"
#include "SubstituteData.h"
#include "WorkerInspectorController.h"
+#include "WorkerScriptDebugServer.h"
#include <wtf/OwnPtr.h>
#include <wtf/Threading.h>
@@ -166,7 +167,7 @@
void WebWorkerImpl::detachDevTools()
{
- workerThread()->runLoop().postTask(createCallbackTask(disconnectFromWorkerContextInspectorTask, true));
+ workerThread()->runLoop().postTaskForMode(createCallbackTask(disconnectFromWorkerContextInspectorTask, true), WorkerScriptDebugServer::debuggerTaskMode);
}
static void dispatchOnInspectorBackendTask(ScriptExecutionContext* context, const String& message)
@@ -177,7 +178,7 @@
void WebWorkerImpl::dispatchDevToolsMessage(const WebString& message)
{
- workerThread()->runLoop().postTaskForMode(createCallbackTask(dispatchOnInspectorBackendTask, String(message)), "debugger");
+ workerThread()->runLoop().postTaskForMode(createCallbackTask(dispatchOnInspectorBackendTask, String(message)), WorkerScriptDebugServer::debuggerTaskMode);
}
#else
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes