| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 V8_INSPECTOR_V8DEBUGGER_H_ | 5 #ifndef V8_INSPECTOR_V8DEBUGGER_H_ |
| 6 #define V8_INSPECTOR_V8DEBUGGER_H_ | 6 #define V8_INSPECTOR_V8DEBUGGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 void muteScriptParsedEvents(); | 88 void muteScriptParsedEvents(); |
| 89 void unmuteScriptParsedEvents(); | 89 void unmuteScriptParsedEvents(); |
| 90 | 90 |
| 91 V8InspectorImpl* inspector() { return m_inspector; } | 91 V8InspectorImpl* inspector() { return m_inspector; } |
| 92 | 92 |
| 93 WasmTranslation* wasmTranslation() { return &m_wasmTranslation; } | 93 WasmTranslation* wasmTranslation() { return &m_wasmTranslation; } |
| 94 | 94 |
| 95 void setMaxAsyncTaskStacksForTest(int limit) { m_maxAsyncCallStacks = limit; } | 95 void setMaxAsyncTaskStacksForTest(int limit) { m_maxAsyncCallStacks = limit; } |
| 96 | 96 |
| 97 void setSkipAllPauses(bool skipAll) { m_skipAllPauses = skipAll; } |
| 98 |
| 97 private: | 99 private: |
| 98 void compileDebuggerScript(); | 100 void compileDebuggerScript(); |
| 99 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, | 101 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, |
| 100 int argc, | 102 int argc, |
| 101 v8::Local<v8::Value> argv[], | 103 v8::Local<v8::Value> argv[], |
| 102 bool catchExceptions); | 104 bool catchExceptions); |
| 103 v8::Local<v8::Context> debuggerContext() const; | 105 v8::Local<v8::Context> debuggerContext() const; |
| 104 void clearBreakpoints(); | 106 void clearBreakpoints(); |
| 105 | 107 |
| 106 static void v8OOMCallback(void* data); | 108 static void v8OOMCallback(void* data); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 V8InspectorImpl* m_inspector; | 158 V8InspectorImpl* m_inspector; |
| 157 int m_enableCount; | 159 int m_enableCount; |
| 158 bool m_breakpointsActivated; | 160 bool m_breakpointsActivated; |
| 159 v8::Global<v8::Object> m_debuggerScript; | 161 v8::Global<v8::Object> m_debuggerScript; |
| 160 v8::Global<v8::Context> m_debuggerContext; | 162 v8::Global<v8::Context> m_debuggerContext; |
| 161 v8::Local<v8::Object> m_executionState; | 163 v8::Local<v8::Object> m_executionState; |
| 162 v8::Local<v8::Context> m_pausedContext; | 164 v8::Local<v8::Context> m_pausedContext; |
| 163 bool m_runningNestedMessageLoop; | 165 bool m_runningNestedMessageLoop; |
| 164 int m_ignoreScriptParsedEventsCounter; | 166 int m_ignoreScriptParsedEventsCounter; |
| 165 bool m_scheduledOOMBreak = false; | 167 bool m_scheduledOOMBreak = false; |
| 168 bool m_skipAllPauses = false; |
| 166 | 169 |
| 167 using AsyncTaskToStackTrace = | 170 using AsyncTaskToStackTrace = |
| 168 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; | 171 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; |
| 169 AsyncTaskToStackTrace m_asyncTaskStacks; | 172 AsyncTaskToStackTrace m_asyncTaskStacks; |
| 170 AsyncTaskToStackTrace m_asyncTaskCreationStacks; | 173 AsyncTaskToStackTrace m_asyncTaskCreationStacks; |
| 171 int m_maxAsyncCallStacks; | 174 int m_maxAsyncCallStacks; |
| 172 std::map<int, void*> m_idToTask; | 175 std::map<int, void*> m_idToTask; |
| 173 std::unordered_map<void*, int> m_taskToId; | 176 std::unordered_map<void*, int> m_taskToId; |
| 174 int m_lastTaskId; | 177 int m_lastTaskId; |
| 175 protocol::HashSet<void*> m_recurringTasks; | 178 protocol::HashSet<void*> m_recurringTasks; |
| 176 int m_maxAsyncCallStackDepth; | 179 int m_maxAsyncCallStackDepth; |
| 177 std::vector<void*> m_currentTasks; | 180 std::vector<void*> m_currentTasks; |
| 178 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 181 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
| 179 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 182 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
| 180 protocol::HashMap<void*, void*> m_parentTask; | 183 protocol::HashMap<void*, void*> m_parentTask; |
| 181 | 184 |
| 182 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 185 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
| 183 | 186 |
| 184 WasmTranslation m_wasmTranslation; | 187 WasmTranslation m_wasmTranslation; |
| 185 | 188 |
| 186 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 189 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 } // namespace v8_inspector | 192 } // namespace v8_inspector |
| 190 | 193 |
| 191 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 194 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
| OLD | NEW |