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

Unified Diff: Source/core/workers/WorkerInspectorProxy.cpp

Issue 1115923002: workers: Rename WorkerThread to WorkerScript. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . 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/core/workers/WorkerInspectorProxy.cpp
diff --git a/Source/core/workers/WorkerInspectorProxy.cpp b/Source/core/workers/WorkerInspectorProxy.cpp
index 3a613359e5c78bdbb0706a5032baaa7c92fe5723..82f2df2f7f314e016e56808d8517f8dc5c0f380c 100644
--- a/Source/core/workers/WorkerInspectorProxy.cpp
+++ b/Source/core/workers/WorkerInspectorProxy.cpp
@@ -10,14 +10,14 @@
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "core/inspector/WorkerInspectorController.h"
-#include "core/workers/WorkerThread.h"
+#include "core/workers/WorkerScript.h"
#include "platform/TraceEvent.h"
#include "platform/weborigin/KURL.h"
namespace blink {
WorkerInspectorProxy::WorkerInspectorProxy()
- : m_workerThread(nullptr)
+ : m_workerScript(nullptr)
, m_executionContext(nullptr)
, m_pageInspector(nullptr)
, m_workerGlobalScopeProxy(nullptr)
@@ -33,18 +33,18 @@ WorkerInspectorProxy::~WorkerInspectorProxy()
{
}
-void WorkerInspectorProxy::workerThreadCreated(ExecutionContext* context, WorkerThread* workerThread, const KURL& url)
+void WorkerInspectorProxy::workerScriptCreated(ExecutionContext* context, WorkerScript* workerScript, const KURL& url)
{
- m_workerThread = workerThread;
+ m_workerScript = workerScript;
m_executionContext = context;
InspectorInstrumentation::didStartWorker(context, this, url);
}
-void WorkerInspectorProxy::workerThreadTerminated()
+void WorkerInspectorProxy::workerScriptTerminated()
{
- if (m_workerThread)
+ if (m_workerScript)
InspectorInstrumentation::workerTerminated(m_executionContext, this);
- m_workerThread = nullptr;
+ m_workerScript = nullptr;
m_pageInspector = nullptr;
}
@@ -55,11 +55,11 @@ static void connectToWorkerGlobalScopeInspectorTask(ExecutionContext* context)
void WorkerInspectorProxy::connectToInspector(WorkerInspectorProxy::PageInspector* pageInspector)
{
- if (!m_workerThread)
+ if (!m_workerScript)
return;
ASSERT(!m_pageInspector);
m_pageInspector = pageInspector;
- m_workerThread->postDebuggerTask(FROM_HERE, createCrossThreadTask(connectToWorkerGlobalScopeInspectorTask));
+ m_workerScript->postDebuggerTask(FROM_HERE, createCrossThreadTask(connectToWorkerGlobalScopeInspectorTask));
}
static void disconnectFromWorkerGlobalScopeInspectorTask(ExecutionContext* context)
@@ -70,9 +70,9 @@ static void disconnectFromWorkerGlobalScopeInspectorTask(ExecutionContext* conte
void WorkerInspectorProxy::disconnectFromInspector()
{
m_pageInspector = nullptr;
- if (!m_workerThread)
+ if (!m_workerScript)
return;
- m_workerThread->postDebuggerTask(FROM_HERE, createCrossThreadTask(disconnectFromWorkerGlobalScopeInspectorTask));
+ m_workerScript->postDebuggerTask(FROM_HERE, createCrossThreadTask(disconnectFromWorkerGlobalScopeInspectorTask));
}
static void dispatchOnInspectorBackendTask(const String& message, ExecutionContext* context)
@@ -82,17 +82,17 @@ static void dispatchOnInspectorBackendTask(const String& message, ExecutionConte
void WorkerInspectorProxy::sendMessageToInspector(const String& message)
{
- if (!m_workerThread)
+ if (!m_workerScript)
return;
- m_workerThread->postDebuggerTask(FROM_HERE, createCrossThreadTask(dispatchOnInspectorBackendTask, message));
- m_workerThread->interruptAndDispatchInspectorCommands();
+ m_workerScript->postDebuggerTask(FROM_HERE, createCrossThreadTask(dispatchOnInspectorBackendTask, message));
+ m_workerScript->interruptAndDispatchInspectorCommands();
}
void WorkerInspectorProxy::writeTimelineStartedEvent(const String& sessionId, const String& workerId)
{
- if (!m_workerThread)
+ if (!m_workerScript)
return;
- TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TracingSessionIdForWorker", TRACE_EVENT_SCOPE_THREAD, "data", InspectorTracingSessionIdForWorkerEvent::data(sessionId, workerId, m_workerThread));
+ TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "TracingSessionIdForWorker", TRACE_EVENT_SCOPE_THREAD, "data", InspectorTracingSessionIdForWorkerEvent::data(sessionId, workerId, m_workerScript));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698