| Index: test/inspector/task-runner.h
|
| diff --git a/test/inspector/task-runner.h b/test/inspector/task-runner.h
|
| index fc65ab7cdef3f96f8417bf9a70b077dd5c788659..d78cd390d686e7b15cb318a8398705aa9125ca01 100644
|
| --- a/test/inspector/task-runner.h
|
| +++ b/test/inspector/task-runner.h
|
| @@ -8,6 +8,7 @@
|
| #include "include/v8-inspector.h"
|
| #include "include/v8-platform.h"
|
| #include "include/v8.h"
|
| +#include "src/base/atomic-utils.h"
|
| #include "src/base/macros.h"
|
| #include "src/base/platform/platform.h"
|
| #include "src/locked-queue-inl.h"
|
| @@ -39,6 +40,8 @@ class TaskRunner : public v8::base::Thread {
|
|
|
| static TaskRunner* FromContext(v8::Local<v8::Context>);
|
|
|
| + void Terminate();
|
| +
|
| private:
|
| void InitializeContext();
|
| Task* GetNext(bool only_protocol);
|
| @@ -51,15 +54,16 @@ class TaskRunner : public v8::base::Thread {
|
| v8::Global<v8::Context> context_;
|
|
|
| // deferred_queue_ combined with queue_ (in this order) have all tasks in the
|
| - // correct order.
|
| - // Sometimes we skip non-protocol tasks by moving them from queue_ to
|
| - // deferred_queue_.
|
| + // correct order. Sometimes we skip non-protocol tasks by moving them from
|
| + // queue_ to deferred_queue_.
|
| v8::internal::LockedQueue<Task*> queue_;
|
| v8::internal::LockedQueue<Task*> deffered_queue_;
|
| v8::base::Semaphore process_queue_semaphore_;
|
|
|
| int nested_loop_count_;
|
|
|
| + v8::base::AtomicNumber<int> is_terminated_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TaskRunner);
|
| };
|
|
|
|
|