Skip to content

Commit

Permalink
Do not expose InspectorTaskRunner from WorkerThread.
Browse files Browse the repository at this point in the history
BUG=none

Review URL: https://codereview.chromium.org/1765043002

Cr-Commit-Position: refs/heads/master@{#379380}
  • Loading branch information
dgozman authored and Commit bot committed Mar 4, 2016
1 parent 26920e9 commit 8e34a51
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ WorkerInspectorController::~WorkerInspectorController()
void WorkerInspectorController::connectFrontend()
{
ASSERT(!m_frontend);
InspectorTaskRunner::IgnoreInterruptsScope scope(m_workerGlobalScope->thread()->inspectorTaskRunner());
m_frontend = adoptPtr(new protocol::Frontend(this));
m_backendDispatcher = protocol::Dispatcher::create(this);
m_agents.registerInDispatcher(m_backendDispatcher.get());
Expand All @@ -104,7 +103,6 @@ void WorkerInspectorController::disconnectFrontend()
{
if (!m_frontend)
return;
InspectorTaskRunner::IgnoreInterruptsScope scope(m_workerGlobalScope->thread()->inspectorTaskRunner());
m_backendDispatcher->clearFrontend();
m_backendDispatcher.clear();
m_agents.clearFrontend();
Expand All @@ -114,7 +112,6 @@ void WorkerInspectorController::disconnectFrontend()

void WorkerInspectorController::dispatchMessageFromFrontend(const String& message)
{
InspectorTaskRunner::IgnoreInterruptsScope scope(m_workerGlobalScope->thread()->inspectorTaskRunner());
if (m_backendDispatcher) {
// sessionId will be overwritten by WebDevToolsAgent::sendProtocolNotifications call.
m_backendDispatcher->dispatch(0, message);
Expand Down
6 changes: 1 addition & 5 deletions third_party/WebKit/Source/core/workers/WorkerThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,6 @@ WorkerGlobalScope* WorkerThread::workerGlobalScope()
return m_workerGlobalScope.get();
}

InspectorTaskRunner* WorkerThread::inspectorTaskRunner()
{
return m_inspectorTaskRunner.get();
}

bool WorkerThread::terminated()
{
MutexLocker lock(m_threadStateMutex);
Expand Down Expand Up @@ -554,6 +549,7 @@ WorkerThread::TaskQueueResult WorkerThread::runDebuggerTask(WaitMode waitMode)
}

if (result == TaskReceived) {
InspectorTaskRunner::IgnoreInterruptsScope scope(m_inspectorTaskRunner.get());
{
MutexLocker lock(m_threadStateMutex);
m_runningDebuggerTask = true;
Expand Down
3 changes: 0 additions & 3 deletions third_party/WebKit/Source/core/workers/WorkerThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ class CORE_EXPORT WorkerThread {
// Can be called only on the worker thread, WorkerGlobalScope is not thread safe.
WorkerGlobalScope* workerGlobalScope();

// Can be called on any thread.
InspectorTaskRunner* inspectorTaskRunner();

// Returns true once one of the terminate* methods is called.
bool terminated();

Expand Down

0 comments on commit 8e34a51

Please sign in to comment.