| Index: src/debug.h
|
| diff --git a/src/debug.h b/src/debug.h
|
| index 4440d659dc18198e8c07bde4ca754efcbf7ab396..616f5b3915ec358f6926eb88a3d99ef50afbe555 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 {
|
| + public:
|
| + LockingTaskQueue();
|
| + ~LockingTaskQueue();
|
| + void Enqueue(v8::Task* task);
|
| + v8::Task* Dequeue();
|
| + void Clear();
|
| +
|
| + private:
|
| + std::queue<v8::Task*> queue_;
|
| + base::Mutex mutex_;
|
| + DISALLOW_COPY_AND_ASSIGN(LockingTaskQueue);
|
| +};
|
| +
|
| +
|
| // 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::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_;
|
|
|