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

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

Issue 644663004: Use C++11 features in core/workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/WorkerScriptLoader.cpp ('k') | no next file » | 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 5be4464d3cd23ed3aab1fb1704f5741ad391f8c2..93d28e27d0dde7737159a5f87c36e361a29b9efb 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -117,7 +117,7 @@ public:
: m_workerThread(workerThread)
, m_nextFireTime(0.0)
, m_running(false)
- , m_lastQueuedTask(0)
+ , m_lastQueuedTask(nullptr)
{ }
typedef void (*SharedTimerFunction)();
@@ -447,11 +447,11 @@ void WorkerThread::terminateAndWaitForAllWorkers()
// Keep this lock to prevent WorkerThread instances from being destroyed.
MutexLocker lock(threadSetMutex());
HashSet<WorkerThread*> threads = workerThreads();
- for (HashSet<WorkerThread*>::iterator itr = threads.begin(); itr != threads.end(); ++itr)
- (*itr)->stopInShutdownSequence();
+ for (WorkerThread* thread : threads)
+ thread->stopInShutdownSequence();
- for (HashSet<WorkerThread*>::iterator itr = threads.begin(); itr != threads.end(); ++itr)
- (*itr)->terminationEvent()->wait();
+ for (WorkerThread* thread : threads)
+ thread->terminationEvent()->wait();
}
bool WorkerThread::isCurrentThread() const
« no previous file with comments | « Source/core/workers/WorkerScriptLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698