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

Side by Side Diff: src/debug.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, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
3318 new_queue.start_ = new_queue.end_; 3318 new_queue.start_ = new_queue.end_;
3319 // Automatic destructor called on new_queue, freeing array_to_free. 3319 // Automatic destructor called on new_queue, freeing array_to_free.
3320 } 3320 }
3321 3321
3322 3322
3323 LockingCommandMessageQueue::LockingCommandMessageQueue(Logger* logger, int size) 3323 LockingCommandMessageQueue::LockingCommandMessageQueue(Logger* logger, int size)
3324 : logger_(logger), queue_(size) {} 3324 : logger_(logger), queue_(size) {}
3325 3325
3326 3326
3327 bool LockingCommandMessageQueue::IsEmpty() const { 3327 bool LockingCommandMessageQueue::IsEmpty() const {
3328 LockGuard<Mutex> lock_guard(&mutex_); 3328 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3329 return queue_.IsEmpty(); 3329 return queue_.IsEmpty();
3330 } 3330 }
3331 3331
3332 3332
3333 CommandMessage LockingCommandMessageQueue::Get() { 3333 CommandMessage LockingCommandMessageQueue::Get() {
3334 LockGuard<Mutex> lock_guard(&mutex_); 3334 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3335 CommandMessage result = queue_.Get(); 3335 CommandMessage result = queue_.Get();
3336 logger_->DebugEvent("Get", result.text()); 3336 logger_->DebugEvent("Get", result.text());
3337 return result; 3337 return result;
3338 } 3338 }
3339 3339
3340 3340
3341 void LockingCommandMessageQueue::Put(const CommandMessage& message) { 3341 void LockingCommandMessageQueue::Put(const CommandMessage& message) {
3342 LockGuard<Mutex> lock_guard(&mutex_); 3342 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3343 queue_.Put(message); 3343 queue_.Put(message);
3344 logger_->DebugEvent("Put", message.text()); 3344 logger_->DebugEvent("Put", message.text());
3345 } 3345 }
3346 3346
3347 3347
3348 void LockingCommandMessageQueue::Clear() { 3348 void LockingCommandMessageQueue::Clear() {
3349 LockGuard<Mutex> lock_guard(&mutex_); 3349 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3350 queue_.Clear(); 3350 queue_.Clear();
3351 } 3351 }
3352 3352
3353 } } // namespace v8::internal 3353 } } // namespace v8::internal
OLDNEW
« src/base/macros.h ('K') | « src/debug.h ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698