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

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

Issue 1140503003: workers: Change how debugger-tasks are posted to the thread. (Closed) 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/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index b7e1c004f8659557021be89208b453a8a8b999b8..e43ba015109b85d44c666cd947274212f2cc4b27 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -249,24 +249,6 @@ private:
bool m_isInstrumented;
};
-class RunDebuggerQueueTask final : public ExecutionContextTask {
-public:
- static PassOwnPtr<RunDebuggerQueueTask> create(WorkerThread* thread)
- {
- return adoptPtr(new RunDebuggerQueueTask(thread));
- }
- virtual void performTask(ExecutionContext* context) override
- {
- ASSERT(context->isWorkerGlobalScope());
- m_thread->runDebuggerTask(WorkerThread::DontWaitForMessage);
- }
-
-private:
- explicit RunDebuggerQueueTask(WorkerThread* thread) : m_thread(thread) { }
-
- WorkerThread* m_thread;
-};
-
WorkerThread::WorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy)
: m_started(false)
, m_terminated(false)
@@ -552,10 +534,9 @@ void WorkerThread::terminateV8Execution()
v8::V8::TerminateExecution(m_isolate);
}
-void WorkerThread::postDebuggerTask(const WebTraceLocation& location, PassOwnPtr<ExecutionContextTask> task)
+void WorkerThread::appendDebuggerTask(PassOwnPtr<WebThread::Task> task)
kinuko 2015/05/18 15:19:49 Assuming that we're also going to remove willEnter
sadrul 2015/05/19 03:50:47 That's an interesting idea. pfeldman@/yurus@: what
{
- m_debuggerMessageQueue.append(WorkerThreadTask::create(*this, task, false));
- postTask(location, RunDebuggerQueueTask::create(this));
+ m_debuggerMessageQueue.append(task);
}
MessageQueueWaitResult WorkerThread::runDebuggerTask(WaitMode waitMode)
« Source/core/workers/WorkerInspectorProxy.cpp ('K') | « Source/core/workers/WorkerThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698