OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 #ifndef ThreadDebugger_h | 5 #ifndef ThreadDebugger_h |
6 #define ThreadDebugger_h | 6 #define ThreadDebugger_h |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/inspector/ConsoleTypes.h" | 10 #include "core/inspector/ConsoleTypes.h" |
(...skipping 27 matching lines...) Loading... |
38 } | 38 } |
39 | 39 |
40 static void IdleStarted(v8::Isolate*); | 40 static void IdleStarted(v8::Isolate*); |
41 static void IdleFinished(v8::Isolate*); | 41 static void IdleFinished(v8::Isolate*); |
42 | 42 |
43 void AsyncTaskScheduled(const String& task_name, void* task, bool recurring); | 43 void AsyncTaskScheduled(const String& task_name, void* task, bool recurring); |
44 void AsyncTaskCanceled(void* task); | 44 void AsyncTaskCanceled(void* task); |
45 void AllAsyncTasksCanceled(); | 45 void AllAsyncTasksCanceled(); |
46 void AsyncTaskStarted(void* task); | 46 void AsyncTaskStarted(void* task); |
47 void AsyncTaskFinished(void* task); | 47 void AsyncTaskFinished(void* task); |
| 48 bool IsRunningAsyncTask() const { return current_async_tasks_; } |
48 unsigned PromiseRejected(v8::Local<v8::Context>, | 49 unsigned PromiseRejected(v8::Local<v8::Context>, |
49 const String& error_message, | 50 const String& error_message, |
50 v8::Local<v8::Value> exception, | 51 v8::Local<v8::Value> exception, |
51 std::unique_ptr<SourceLocation>); | 52 std::unique_ptr<SourceLocation>); |
52 void PromiseRejectionRevoked(v8::Local<v8::Context>, | 53 void PromiseRejectionRevoked(v8::Local<v8::Context>, |
53 unsigned promise_rejection_id); | 54 unsigned promise_rejection_id); |
54 | 55 |
55 protected: | 56 protected: |
56 virtual int ContextGroupId(ExecutionContext*) = 0; | 57 virtual int ContextGroupId(ExecutionContext*) = 0; |
57 virtual void ReportConsoleMessage(ExecutionContext*, | 58 virtual void ReportConsoleMessage(ExecutionContext*, |
(...skipping 45 matching lines...) Loading... |
103 | 104 |
104 static void GetEventListenersCallback( | 105 static void GetEventListenersCallback( |
105 const v8::FunctionCallbackInfo<v8::Value>&); | 106 const v8::FunctionCallbackInfo<v8::Value>&); |
106 | 107 |
107 std::unique_ptr<v8_inspector::V8Inspector> v8_inspector_; | 108 std::unique_ptr<v8_inspector::V8Inspector> v8_inspector_; |
108 std::unique_ptr<v8::TracingCpuProfiler> v8_tracing_cpu_profiler_; | 109 std::unique_ptr<v8::TracingCpuProfiler> v8_tracing_cpu_profiler_; |
109 Vector<std::unique_ptr<Timer<ThreadDebugger>>> timers_; | 110 Vector<std::unique_ptr<Timer<ThreadDebugger>>> timers_; |
110 Vector<v8_inspector::V8InspectorClient::TimerCallback> timer_callbacks_; | 111 Vector<v8_inspector::V8InspectorClient::TimerCallback> timer_callbacks_; |
111 Vector<void*> timer_data_; | 112 Vector<void*> timer_data_; |
112 std::unique_ptr<UserGestureIndicator> user_gesture_indicator_; | 113 std::unique_ptr<UserGestureIndicator> user_gesture_indicator_; |
| 114 |
| 115 int current_async_tasks_ = 0; |
113 }; | 116 }; |
114 | 117 |
115 } // namespace blink | 118 } // namespace blink |
116 | 119 |
117 #endif // ThreadDebugger_h | 120 #endif // ThreadDebugger_h |
OLD | NEW |