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 V8DebuggerAgent_h | 5 #ifndef V8DebuggerAgent_h |
6 #define V8DebuggerAgent_h | 6 #define V8DebuggerAgent_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
10 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum
breakReason, PassRefPtr<JSONObject> data); | 130 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum
breakReason, PassRefPtr<JSONObject> data); |
131 void didFireTimer(); | 131 void didFireTimer(); |
132 void didHandleEvent(); | 132 void didHandleEvent(); |
133 bool canBreakProgram(); | 133 bool canBreakProgram(); |
134 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas
sRefPtr<JSONObject> data); | 134 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas
sRefPtr<JSONObject> data); |
135 void scriptExecutionBlockedByCSP(const String& directiveText); | 135 void scriptExecutionBlockedByCSP(const String& directiveText); |
136 void willCallFunction(ExecutionContext*, const DevToolsFunctionInfo&); | 136 void willCallFunction(ExecutionContext*, const DevToolsFunctionInfo&); |
137 void didCallFunction(); | 137 void didCallFunction(); |
138 void willEvaluateScript(const String& url, int lineNumber); | 138 void willEvaluateScript(const String& url, int lineNumber); |
139 void didEvaluateScript(); | 139 void didEvaluateScript(); |
140 bool getEditedScript(const String& url, String* content); | |
141 | 140 |
142 bool enabled(); | 141 bool enabled(); |
143 V8Debugger& debugger() { return *m_debugger; } | 142 V8Debugger& debugger() { return *m_debugger; } |
144 | 143 |
145 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber,
BreakpointSource, const String& condition = String()); | 144 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber,
BreakpointSource, const String& condition = String()); |
146 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb
er, BreakpointSource); | 145 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb
er, BreakpointSource); |
147 | 146 |
148 // Async call stacks implementation | 147 // Async call stacks implementation |
149 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsol
e(); | 148 PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsol
e(); |
150 static const int unknownAsyncOperationId; | 149 static const int unknownAsyncOperationId; |
(...skipping 12 matching lines...) Expand all Loading... |
163 }; | 162 }; |
164 void addAsyncCallTrackingListener(AsyncCallTrackingListener*); | 163 void addAsyncCallTrackingListener(AsyncCallTrackingListener*); |
165 void removeAsyncCallTrackingListener(AsyncCallTrackingListener*); | 164 void removeAsyncCallTrackingListener(AsyncCallTrackingListener*); |
166 | 165 |
167 // PromiseTracker::Listener | 166 // PromiseTracker::Listener |
168 void didUpdatePromise(InspectorFrontend::Debugger::EventType::Enum, PassRefP
tr<TypeBuilder::Debugger::PromiseDetails>) final; | 167 void didUpdatePromise(InspectorFrontend::Debugger::EventType::Enum, PassRefP
tr<TypeBuilder::Debugger::PromiseDetails>) final; |
169 | 168 |
170 InjectedScript injectedScriptForEval(ErrorString*, const int* executionConte
xtId); | 169 InjectedScript injectedScriptForEval(ErrorString*, const int* executionConte
xtId); |
171 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 170 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
172 void reset(); | 171 void reset(); |
173 void resetModifiedSources(); | |
174 | 172 |
175 private: | 173 private: |
176 bool checkEnabled(ErrorString*); | 174 bool checkEnabled(ErrorString*); |
177 void enable(); | 175 void enable(); |
178 void disable(); | 176 void disable(); |
179 | 177 |
180 SkipPauseRequest didPause(v8::Local<v8::Context>, v8::Local<v8::Object> call
Frames, v8::Local<v8::Value> exception, const Vector<String>& hitBreakpoints, bo
ol isPromiseRejection) final; | 178 SkipPauseRequest didPause(v8::Local<v8::Context>, v8::Local<v8::Object> call
Frames, v8::Local<v8::Value> exception, const Vector<String>& hitBreakpoints, bo
ol isPromiseRejection) final; |
181 void didContinue() final; | 179 void didContinue() final; |
182 | 180 |
183 SkipPauseRequest shouldSkipExceptionPause(); | 181 SkipPauseRequest shouldSkipExceptionPause(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 int m_recursionLevelForStepOut; | 253 int m_recursionLevelForStepOut; |
256 int m_recursionLevelForStepFrame; | 254 int m_recursionLevelForStepFrame; |
257 bool m_skipAllPauses; | 255 bool m_skipAllPauses; |
258 bool m_skipContentScripts; | 256 bool m_skipContentScripts; |
259 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; | 257 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; |
260 unsigned m_cachedSkipStackGeneration; | 258 unsigned m_cachedSkipStackGeneration; |
261 WillBeHeapHashSet<RawPtrWillBeWeakMember<AsyncCallTrackingListener>> m_async
CallTrackingListeners; | 259 WillBeHeapHashSet<RawPtrWillBeWeakMember<AsyncCallTrackingListener>> m_async
CallTrackingListeners; |
262 // This field must be destroyed before the listeners set above. | 260 // This field must be destroyed before the listeners set above. |
263 OwnPtrWillBeMember<V8AsyncCallTracker> m_v8AsyncCallTracker; | 261 OwnPtrWillBeMember<V8AsyncCallTracker> m_v8AsyncCallTracker; |
264 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker; | 262 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker; |
265 HashMap<String, String> m_editedScripts; | |
266 | 263 |
267 using AsyncOperationIdToAsyncCallChain = WillBeHeapHashMap<int, RefPtrWillBe
Member<AsyncCallChain>>; | 264 using AsyncOperationIdToAsyncCallChain = WillBeHeapHashMap<int, RefPtrWillBe
Member<AsyncCallChain>>; |
268 AsyncOperationIdToAsyncCallChain m_asyncOperations; | 265 AsyncOperationIdToAsyncCallChain m_asyncOperations; |
269 int m_lastAsyncOperationId; | 266 int m_lastAsyncOperationId; |
270 ListHashSet<int> m_asyncOperationNotifications; | 267 ListHashSet<int> m_asyncOperationNotifications; |
271 HashSet<int> m_asyncOperationBreakpoints; | 268 HashSet<int> m_asyncOperationBreakpoints; |
272 HashSet<int> m_pausingAsyncOperations; | 269 HashSet<int> m_pausingAsyncOperations; |
273 unsigned m_maxAsyncCallStackDepth; | 270 unsigned m_maxAsyncCallStackDepth; |
274 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; | 271 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; |
275 unsigned m_nestedAsyncCallCount; | 272 unsigned m_nestedAsyncCallCount; |
276 int m_currentAsyncOperationId; | 273 int m_currentAsyncOperationId; |
277 bool m_pendingTraceAsyncOperationCompleted; | 274 bool m_pendingTraceAsyncOperationCompleted; |
278 bool m_startingStepIntoAsync; | 275 bool m_startingStepIntoAsync; |
279 V8GlobalValueMap<String, v8::Script, v8::kNotWeak> m_compiledScripts; | 276 V8GlobalValueMap<String, v8::Script, v8::kNotWeak> m_compiledScripts; |
280 }; | 277 }; |
281 | 278 |
282 } // namespace blink | 279 } // namespace blink |
283 | 280 |
284 | 281 |
285 #endif // V8DebuggerAgent_h | 282 #endif // V8DebuggerAgent_h |
OLD | NEW |