Chromium Code Reviews| Index: src/debug.h |
| diff --git a/src/debug.h b/src/debug.h |
| index 4440d659dc18198e8c07bde4ca754efcbf7ab396..95673ea7da3192864b6e1c1ff14c856e4a73f6af 100644 |
| --- a/src/debug.h |
| +++ b/src/debug.h |
| @@ -5,6 +5,7 @@ |
| #ifndef V8_DEBUG_H_ |
| #define V8_DEBUG_H_ |
| +#include <queue> |
| #include "src/allocation.h" |
| #include "src/arguments.h" |
| #include "src/assembler.h" |
| @@ -336,6 +337,21 @@ class LockingCommandMessageQueue BASE_EMBEDDED { |
| }; |
| +class LockingTaskQueue BASE_EMBEDDED { |
|
Sven Panne
2014/12/18 08:27:51
Remove BASE_EMBEDDED, it's nonsense, anyway...
alph
2014/12/18 14:28:03
Done.
|
| + public: |
| + LockingTaskQueue(); |
| + ~LockingTaskQueue(); |
| + void Enqueue(v8::Debug::Task* task); |
| + v8::Debug::Task* Dequeue(); |
| + void Clear(); |
| + |
| + private: |
| + std::queue<v8::Debug::Task*> queue_; |
| + mutable base::Mutex mutex_; |
|
Sven Panne
2014/12/18 08:27:51
Without having a single const function, why do we
alph
2014/12/18 14:28:03
We don't. Removed.
|
| + DISALLOW_COPY_AND_ASSIGN(LockingTaskQueue); |
|
Sven Panne
2014/12/18 08:27:51
Strictly speaking this is not necessary and just n
alph
2014/12/18 14:28:03
I don't want it to be depended on the set of field
|
| +}; |
| + |
| + |
| // This class contains the debugger support. The main purpose is to handle |
| // setting break points in the code. |
| // |
| @@ -363,6 +379,8 @@ class Debug { |
| v8::Debug::ClientData* client_data = NULL); |
| // Enqueue a debugger command to the command queue for event listeners. |
| void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); |
| + void EnqueueEmbedderTask(v8::Debug::Task* task); |
| + bool ProcessEmbedderTasks(); |
| MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
| Handle<Object> data); |
| Handle<Context> GetDebugContext(); |
| @@ -593,6 +611,7 @@ class Debug { |
| base::Semaphore command_received_; // Signaled for each command received. |
| LockingCommandMessageQueue command_queue_; |
| LockingCommandMessageQueue event_command_queue_; |
| + LockingTaskQueue embedder_task_queue_; |
| bool is_active_; |
| bool is_suppressed_; |