Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 V8DebuggerAgentImpl_h | 5 #ifndef V8DebuggerAgentImpl_h |
| 6 #define V8DebuggerAgentImpl_h | 6 #define V8DebuggerAgentImpl_h |
| 7 | 7 |
| 8 #include "platform/inspector_protocol/Collections.h" | 8 #include "platform/inspector_protocol/Collections.h" |
| 9 #include "platform/inspector_protocol/Dispatcher.h" | 9 #include "platform/inspector_protocol/Dispatcher.h" |
| 10 #include "platform/inspector_protocol/Frontend.h" | 10 #include "platform/inspector_protocol/Frontend.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 // Async call stacks implementation | 156 // Async call stacks implementation |
| 157 int traceAsyncOperationStarting(const String16& description) override; | 157 int traceAsyncOperationStarting(const String16& description) override; |
| 158 void traceAsyncCallbackStarting(int operationId) override; | 158 void traceAsyncCallbackStarting(int operationId) override; |
| 159 void traceAsyncCallbackCompleted() override; | 159 void traceAsyncCallbackCompleted() override; |
| 160 void traceAsyncOperationCompleted(int operationId) override; | 160 void traceAsyncOperationCompleted(int operationId) override; |
| 161 bool trackingAsyncCalls() const override { return m_maxAsyncCallStackDepth; } | 161 bool trackingAsyncCalls() const override { return m_maxAsyncCallStackDepth; } |
| 162 | 162 |
| 163 void reset(); | 163 void reset(); |
| 164 | 164 |
| 165 // Interface for V8DebuggerImpl | 165 // Interface for V8DebuggerImpl |
| 166 SkipPauseRequest didPause(v8::Local<v8::Context>, PassOwnPtr<JavaScriptCallF rame> callFrames, v8::Local<v8::Value> exception, const protocol::Vector<String1 6>& hitBreakpoints, bool isPromiseRejection); | 166 SkipPauseRequest didPause(v8::Local<v8::Context>, v8::Local<v8::Value> excep tion, const protocol::Vector<String16>& hitBreakpoints, bool isPromiseRejection) ; |
| 167 void didContinue(); | 167 void didContinue(); |
| 168 void didParseSource(const V8DebuggerParsedScript&); | 168 void didParseSource(const V8DebuggerParsedScript&); |
| 169 bool v8AsyncTaskEventsEnabled() const; | 169 bool v8AsyncTaskEventsEnabled() const; |
| 170 void didReceiveV8AsyncTaskEvent(v8::Local<v8::Context>, const String16& even tType, const String16& eventName, int id); | 170 void didReceiveV8AsyncTaskEvent(v8::Local<v8::Context>, const String16& even tType, const String16& eventName, int id); |
| 171 | 171 |
| 172 v8::Isolate* isolate() { return m_isolate; } | 172 v8::Isolate* isolate() { return m_isolate; } |
| 173 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } | 173 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } |
| 174 V8StackTraceImpl* currentAsyncCallChain(); | 174 V8StackTraceImpl* currentAsyncCallChain(); |
| 175 | 175 |
| 176 private: | 176 private: |
| 177 bool checkEnabled(ErrorString*); | 177 bool checkEnabled(ErrorString*); |
| 178 void enable(); | 178 void enable(); |
| 179 | 179 |
| 180 SkipPauseRequest shouldSkipExceptionPause(); | 180 SkipPauseRequest shouldSkipExceptionPause(JavaScriptCallFrame* topCallFrame) ; |
| 181 SkipPauseRequest shouldSkipStepPause(); | 181 SkipPauseRequest shouldSkipStepPause(JavaScriptCallFrame* topCallFrame); |
| 182 | 182 |
| 183 void schedulePauseOnNextStatementIfSteppingInto(); | 183 void schedulePauseOnNextStatementIfSteppingInto(); |
| 184 | 184 |
| 185 PassOwnPtr<protocol::Array<protocol::Debugger::CallFrame>> currentCallFrames (ErrorString*); | 185 PassOwnPtr<protocol::Array<protocol::Debugger::CallFrame>> currentCallFrames (ErrorString*); |
| 186 PassOwnPtr<protocol::Runtime::StackTrace> currentAsyncStackTrace(); | 186 PassOwnPtr<protocol::Runtime::StackTrace> currentAsyncStackTrace(); |
| 187 | 187 |
| 188 void clearCurrentAsyncOperation(); | 188 void clearCurrentAsyncOperation(); |
| 189 void resetAsyncCallTracker(); | 189 void resetAsyncCallTracker(); |
| 190 | 190 |
| 191 void changeJavaScriptRecursionLevel(int step); | 191 void changeJavaScriptRecursionLevel(int step); |
| 192 | 192 |
| 193 void setPauseOnExceptionsImpl(ErrorString*, int); | 193 void setPauseOnExceptionsImpl(ErrorString*, int); |
| 194 | 194 |
| 195 PassOwnPtr<protocol::Debugger::Location> resolveBreakpoint(const String16& b reakpointId, const String16& scriptId, const ScriptBreakpoint&, BreakpointSource ); | 195 PassOwnPtr<protocol::Debugger::Location> resolveBreakpoint(const String16& b reakpointId, const String16& scriptId, const ScriptBreakpoint&, BreakpointSource ); |
| 196 void removeBreakpoint(const String16& breakpointId); | 196 void removeBreakpoint(const String16& breakpointId); |
| 197 void clearStepIntoAsync(); | 197 void clearStepIntoAsync(); |
| 198 bool assertPaused(ErrorString*); | 198 bool assertPaused(ErrorString*); |
| 199 void clearBreakDetails(); | 199 void clearBreakDetails(); |
| 200 | 200 |
| 201 bool isCallStackEmptyOrBlackboxed(); | 201 bool isCurrentCallStackEmptyOrBlackboxed(); |
| 202 bool isTopCallFrameBlackboxed(); | 202 bool isTopPausedCallFrameBlackboxed(); |
| 203 bool isCallFrameWithUnknownScriptOrBlackboxed(JavaScriptCallFrame*); | 203 bool isCallFrameWithUnknownScriptOrBlackboxed(JavaScriptCallFrame*); |
| 204 | 204 |
| 205 void internalSetAsyncCallStackDepth(int); | 205 void internalSetAsyncCallStackDepth(int); |
| 206 void increaseCachedSkipStackGeneration(); | 206 void increaseCachedSkipStackGeneration(); |
| 207 | 207 |
| 208 using ScriptsMap = protocol::HashMap<String16, V8DebuggerScript>; | 208 using ScriptsMap = protocol::HashMap<String16, V8DebuggerScript>; |
| 209 using BreakpointIdToDebuggerBreakpointIdsMap = protocol::HashMap<String16, p rotocol::Vector<String16>>; | 209 using BreakpointIdToDebuggerBreakpointIdsMap = protocol::HashMap<String16, p rotocol::Vector<String16>>; |
| 210 using DebugServerBreakpointToBreakpointIdAndSourceMap = protocol::HashMap<St ring16, std::pair<String16, BreakpointSource>>; | 210 using DebugServerBreakpointToBreakpointIdAndSourceMap = protocol::HashMap<St ring16, std::pair<String16, BreakpointSource>>; |
| 211 using MuteBreakpoins = protocol::HashMap<String16, std::pair<String16, int>> ; | 211 using MuteBreakpoins = protocol::HashMap<String16, std::pair<String16, int>> ; |
| 212 | 212 |
| 213 enum DebuggerStep { | 213 enum DebuggerStep { |
| 214 NoStep = 0, | 214 NoStep = 0, |
| 215 StepInto, | 215 StepInto, |
| 216 StepOver, | 216 StepOver, |
| 217 StepOut | 217 StepOut |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 InjectedScriptManager* m_injectedScriptManager; | 220 InjectedScriptManager* m_injectedScriptManager; |
| 221 V8DebuggerImpl* m_debugger; | 221 V8DebuggerImpl* m_debugger; |
| 222 int m_contextGroupId; | 222 int m_contextGroupId; |
| 223 bool m_enabled; | 223 bool m_enabled; |
| 224 protocol::DictionaryValue* m_state; | 224 protocol::DictionaryValue* m_state; |
| 225 protocol::Frontend::Debugger* m_frontend; | 225 protocol::Frontend::Debugger* m_frontend; |
| 226 v8::Isolate* m_isolate; | 226 v8::Isolate* m_isolate; |
| 227 v8::Global<v8::Context> m_pausedContext; | 227 v8::Global<v8::Context> m_pausedContext; |
| 228 OwnPtr<JavaScriptCallFrame> m_currentCallStack; | 228 Vector<OwnPtr<JavaScriptCallFrame>> m_pausedCallFrames; |
|
dgozman
2016/03/26 02:20:23
JavaScriptCallFrames
kozy
2016/03/26 02:22:14
Done.
| |
| 229 ScriptsMap m_scripts; | 229 ScriptsMap m_scripts; |
| 230 BreakpointIdToDebuggerBreakpointIdsMap m_breakpointIdToDebuggerBreakpointIds ; | 230 BreakpointIdToDebuggerBreakpointIdsMap m_breakpointIdToDebuggerBreakpointIds ; |
| 231 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; | 231 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; |
| 232 String16 m_continueToLocationBreakpointId; | 232 String16 m_continueToLocationBreakpointId; |
| 233 String16 m_breakReason; | 233 String16 m_breakReason; |
| 234 OwnPtr<protocol::DictionaryValue> m_breakAuxData; | 234 OwnPtr<protocol::DictionaryValue> m_breakAuxData; |
| 235 DebuggerStep m_scheduledDebuggerStep; | 235 DebuggerStep m_scheduledDebuggerStep; |
| 236 bool m_skipNextDebuggerStepOut; | 236 bool m_skipNextDebuggerStepOut; |
| 237 bool m_javaScriptPauseScheduled; | 237 bool m_javaScriptPauseScheduled; |
| 238 bool m_steppingFromFramework; | 238 bool m_steppingFromFramework; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 259 int m_currentAsyncOperationId; | 259 int m_currentAsyncOperationId; |
| 260 bool m_pendingTraceAsyncOperationCompleted; | 260 bool m_pendingTraceAsyncOperationCompleted; |
| 261 bool m_startingStepIntoAsync; | 261 bool m_startingStepIntoAsync; |
| 262 protocol::HashMap<String16, protocol::Vector<std::pair<int, int>>> m_blackbo xedPositions; | 262 protocol::HashMap<String16, protocol::Vector<std::pair<int, int>>> m_blackbo xedPositions; |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 } // namespace blink | 265 } // namespace blink |
| 266 | 266 |
| 267 | 267 |
| 268 #endif // V8DebuggerAgentImpl_h | 268 #endif // V8DebuggerAgentImpl_h |
| OLD | NEW |