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

Unified Diff: src/libplatform/task-queue.cc

Issue 358363002: Move platform abstraction to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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: src/libplatform/task-queue.cc
diff --git a/src/libplatform/task-queue.cc b/src/libplatform/task-queue.cc
index e618cb70b009287a04193adff6dd507dded2cdec..a5d08f1a14dbc9b1bb62f45d631219cccf0ab5cd 100644
--- a/src/libplatform/task-queue.cc
+++ b/src/libplatform/task-queue.cc
@@ -4,8 +4,7 @@
#include "src/libplatform/task-queue.h"
-// TODO(jochen): We should have our own version of checks.h.
-#include "src/checks.h"
+#include "src/base/logging.h"
namespace v8 {
namespace internal {
@@ -14,14 +13,14 @@ TaskQueue::TaskQueue() : process_queue_semaphore_(0), terminated_(false) {}
TaskQueue::~TaskQueue() {
- LockGuard<Mutex> guard(&lock_);
+ base::LockGuard<base::Mutex> guard(&lock_);
ASSERT(terminated_);
ASSERT(task_queue_.empty());
}
void TaskQueue::Append(Task* task) {
- LockGuard<Mutex> guard(&lock_);
+ base::LockGuard<base::Mutex> guard(&lock_);
ASSERT(!terminated_);
task_queue_.push(task);
process_queue_semaphore_.Signal();
@@ -31,7 +30,7 @@ void TaskQueue::Append(Task* task) {
Task* TaskQueue::GetNext() {
for (;;) {
{
- LockGuard<Mutex> guard(&lock_);
+ base::LockGuard<base::Mutex> guard(&lock_);
if (!task_queue_.empty()) {
Task* result = task_queue_.front();
task_queue_.pop();
@@ -48,7 +47,7 @@ Task* TaskQueue::GetNext() {
void TaskQueue::Terminate() {
- LockGuard<Mutex> guard(&lock_);
+ base::LockGuard<base::Mutex> guard(&lock_);
ASSERT(!terminated_);
terminated_ = true;
process_queue_semaphore_.Signal();

Powered by Google App Engine
This is Rietveld 408576698