| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "core/workers/WorkerInspectorProxy.h" | 7 #include "core/workers/WorkerInspectorProxy.h" |
| 8 | 8 |
| 9 #include "core/dom/CrossThreadTask.h" | 9 #include "core/dom/CrossThreadTask.h" |
| 10 #include "core/inspector/InspectorInstrumentation.h" | 10 #include "core/inspector/InspectorInstrumentation.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 if (!m_workerThread) | 95 if (!m_workerThread) |
| 96 return; | 96 return; |
| 97 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Tracin
gSessionIdForWorker", TRACE_EVENT_SCOPE_THREAD, "data", InspectorTracingSessionI
dForWorkerEvent::data(sessionId, workerId, m_workerThread)); | 97 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Tracin
gSessionIdForWorker", TRACE_EVENT_SCOPE_THREAD, "data", InspectorTracingSessionI
dForWorkerEvent::data(sessionId, workerId, m_workerThread)); |
| 98 } | 98 } |
| 99 | 99 |
| 100 static void runDebuggerTaskForWorker(WorkerThread* workerThread) | 100 static void runDebuggerTaskForWorker(WorkerThread* workerThread) |
| 101 { | 101 { |
| 102 workerThread->runDebuggerTask(WorkerThread::DontWaitForMessage); | 102 workerThread->runDebuggerTask(WorkerThread::DontWaitForMessage); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void WorkerInspectorProxy::addDebuggerTaskForWorker(const WebTraceLocation& loca
tion, PassOwnPtr<WebThread::Task> task) | 105 void WorkerInspectorProxy::addDebuggerTaskForWorker(const WebTraceLocation& loca
tion, PassOwnPtr<WebTaskRunner::Task> task) |
| 106 { | 106 { |
| 107 m_workerThread->appendDebuggerTask(task); | 107 m_workerThread->appendDebuggerTask(task); |
| 108 m_workerThread->backingThread().postTask(location, new Task(threadSafeBind(&
runDebuggerTaskForWorker, AllowCrossThreadAccess(m_workerThread)))); | 108 m_workerThread->backingThread().postTask(location, new Task(threadSafeBind(&
runDebuggerTaskForWorker, AllowCrossThreadAccess(m_workerThread)))); |
| 109 } | 109 } |
| 110 | 110 |
| 111 DEFINE_TRACE(WorkerInspectorProxy) | 111 DEFINE_TRACE(WorkerInspectorProxy) |
| 112 { | 112 { |
| 113 visitor->trace(m_executionContext); | 113 visitor->trace(m_executionContext); |
| 114 visitor->trace(m_pageInspector); | 114 visitor->trace(m_pageInspector); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace blink | 117 } // namespace blink |
| OLD | NEW |