Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: Source/bindings/core/v8/WorkerScriptDebugServer.cpp

Issue 1128273005: Devtools: Move runMessageLoopOnPause and other methods on ScriptDebugServer::Client (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix ownptrs Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/WorkerScriptDebugServer.cpp
diff --git a/Source/bindings/core/v8/WorkerScriptDebugServer.cpp b/Source/bindings/core/v8/WorkerScriptDebugServer.cpp
index d9542d0b2595ddacfef1564ff143eb8fd57c414d..fb36be16505507f6afc3c0289db617c90e53e66e 100644
--- a/Source/bindings/core/v8/WorkerScriptDebugServer.cpp
+++ b/Source/bindings/core/v8/WorkerScriptDebugServer.cpp
@@ -32,7 +32,6 @@
#include "bindings/core/v8/WorkerScriptDebugServer.h"
#include "bindings/core/v8/V8ScriptRunner.h"
-#include "core/inspector/PerIsolateDebuggerClient.h"
#include "core/inspector/ScriptDebugListener.h"
#include "core/inspector/WorkerDebuggerAgent.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -45,18 +44,12 @@ namespace blink {
static const char* workerContextDebugId = "[worker]";
WorkerScriptDebugServer::WorkerScriptDebugServer(WorkerGlobalScope* workerGlobalScope)
- : ScriptDebugServer(v8::Isolate::GetCurrent(), adoptPtr(new PerIsolateDebuggerClient(v8::Isolate::GetCurrent())))
+ : PerIsolateDebuggerClient(v8::Isolate::GetCurrent(), adoptPtr(new ScriptDebugServer(v8::Isolate::GetCurrent(), this)))
, m_listener(0)
, m_workerGlobalScope(workerGlobalScope)
{
}
-DEFINE_TRACE(WorkerScriptDebugServer)
-{
- visitor->trace(m_workerGlobalScope);
- ScriptDebugServer::trace(visitor);
-}
-
void WorkerScriptDebugServer::setContextDebugData(v8::Local<v8::Context> context)
{
ScriptDebugServer::setContextDebugData(context, workerContextDebugId);
@@ -65,17 +58,17 @@ void WorkerScriptDebugServer::setContextDebugData(v8::Local<v8::Context> context
void WorkerScriptDebugServer::addListener(ScriptDebugListener* listener)
{
ASSERT(!m_listener);
- enable();
+ scriptDebugServer()->enable();
m_listener = listener;
- reportCompiledScripts(workerContextDebugId, listener);
+ scriptDebugServer()->reportCompiledScripts(workerContextDebugId, listener);
}
void WorkerScriptDebugServer::removeListener(ScriptDebugListener* listener)
{
ASSERT(m_listener == listener);
- continueProgram();
+ scriptDebugServer()->continueProgram();
m_listener = 0;
- disable();
+ scriptDebugServer()->disable();
}
ScriptDebugListener* WorkerScriptDebugServer::getDebugListenerForContext(v8::Local<v8::Context>)
@@ -91,7 +84,7 @@ void WorkerScriptDebugServer::runMessageLoopOnPause(v8::Local<v8::Context>)
do {
result = m_workerGlobalScope->thread()->runDebuggerTask();
// Keep waiting until execution is resumed.
- } while (result == MessageQueueMessageReceived && isPaused());
+ } while (result == MessageQueueMessageReceived && scriptDebugServer()->isPaused());
m_workerGlobalScope->thread()->didLeaveNestedLoop();
// The listener may have been removed in the nested loop.

Powered by Google App Engine
This is Rietveld 408576698