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

Unified Diff: src/debug.h

Issue 53089: Fixed test memory leaks (Closed)
Patch Set: Created 11 years, 9 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/debug.h
diff --git a/src/debug.h b/src/debug.h
index c29b49b153055bd4bed4d022a91adbe1dd8b5207..d33c701a00fcff38aa256992504e0ba3c0e3c870 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -429,6 +429,7 @@ class Debugger {
bool auto_continue);
static void SetEventListener(Handle<Object> callback, Handle<Object> data);
static void SetMessageHandler(v8::DebugMessageHandler handler, void* data);
+ static void TearDown();
static void SetHostDispatchHandler(v8::DebugHostDispatchHandler handler,
void* data);
static void SendMessage(Vector<uint16_t> message);
@@ -527,7 +528,7 @@ class LockingMessageQueue BASE_EMBEDDED {
class DebugMessageThread: public Thread {
public:
DebugMessageThread(); // Called from API thread.
- virtual ~DebugMessageThread(); // Never called.
+ virtual ~DebugMessageThread();
// Called by V8 thread. Reports events from V8 VM.
// Also handles command processing in stopped state of V8,
// when host_running_ is false.
@@ -554,6 +555,7 @@ class DebugMessageThread: public Thread {
// Check whether there are commands in the queue.
bool HasCommands() { return !command_queue_.IsEmpty(); }
+ void Stop();
bool host_running_; // Is the debugging host running or stopped?
Semaphore* command_received_; // Non-zero when command queue is non-empty.
@@ -564,6 +566,7 @@ class DebugMessageThread: public Thread {
static const int kQueueInitialSize = 4;
LockingMessageQueue command_queue_;
LockingMessageQueue message_queue_;
+ bool keep_running_;
DISALLOW_COPY_AND_ASSIGN(DebugMessageThread);
};

Powered by Google App Engine
This is Rietveld 408576698