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

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

Issue 899923004: Add task location information to WorkerThread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 5 years, 10 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
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index a776f108c4d268db2eb7fa3a2a6e0f3bb3fb8d3c..69d26a5b8871f1dc5d0e94ae47a0381e0592f315 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -170,7 +170,7 @@ public:
// Now queue the task as a cancellable one.
OwnPtr<WorkerThreadCancelableTask> task = WorkerThreadCancelableTask::create(bind(&WorkerSharedTimer::OnTimeout, this));
m_lastQueuedTask = task->createWeakPtr();
- m_workerThread->postDelayedTask(task.release(), delay);
+ m_workerThread->postDelayedTask(FROM_HERE, task.release(), delay);
}
virtual void stop()
@@ -352,7 +352,7 @@ void WorkerThread::initialize()
postInitialize();
- postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kShortIdleHandlerDelayMs);
+ postDelayedTask(FROM_HERE, createSameThreadTask(&WorkerThread::idleHandler, this), kShortIdleHandlerDelayMs);
}
void WorkerThread::cleanup()
@@ -474,7 +474,7 @@ void WorkerThread::stopInternal()
m_workerGlobalScope->script()->scheduleExecutionTermination();
InspectorInstrumentation::didKillAllExecutionContextTasks(m_workerGlobalScope.get());
m_debuggerMessageQueue.kill();
- postTask(WorkerThreadShutdownStartTask::create());
+ postTask(FROM_HERE, WorkerThreadShutdownStartTask::create());
}
void WorkerThread::didStartRunLoop()
@@ -519,23 +519,23 @@ void WorkerThread::idleHandler()
delay = kShortIdleHandlerDelayMs;
}
- postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), delay);
+ postDelayedTask(FROM_HERE, createSameThreadTask(&WorkerThread::idleHandler, this), delay);
}
-void WorkerThread::postTask(PassOwnPtr<ExecutionContextTask> task)
+void WorkerThread::postTask(const WebTraceLocation& location, PassOwnPtr<ExecutionContextTask> task)
{
- m_thread->postTask(FROM_HERE, WorkerThreadTask::create(*this, task, true).leakPtr());
+ m_thread->postTask(location, WorkerThreadTask::create(*this, task, true).leakPtr());
}
-void WorkerThread::postDelayedTask(PassOwnPtr<ExecutionContextTask> task, long long delayMs)
+void WorkerThread::postDelayedTask(const WebTraceLocation& location, PassOwnPtr<ExecutionContextTask> task, long long delayMs)
{
- m_thread->postDelayedTask(FROM_HERE, WorkerThreadTask::create(*this, task, true).leakPtr(), delayMs);
+ m_thread->postDelayedTask(location, WorkerThreadTask::create(*this, task, true).leakPtr(), delayMs);
}
-void WorkerThread::postDebuggerTask(PassOwnPtr<ExecutionContextTask> task)
+void WorkerThread::postDebuggerTask(const WebTraceLocation& location, PassOwnPtr<ExecutionContextTask> task)
{
m_debuggerMessageQueue.append(WorkerThreadTask::create(*this, task, false));
- postTask(RunDebuggerQueueTask::create(this));
+ postTask(location, RunDebuggerQueueTask::create(this));
}
MessageQueueWaitResult WorkerThread::runDebuggerTask(WaitMode waitMode)
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698