Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.h

Issue 732593002: DevTools: Make StepInto work across script boundaries and Blink process tasks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void willPerformExecutionContextTask(ExecutionContext*, ExecutionContextTask *); 171 void willPerformExecutionContextTask(ExecutionContext*, ExecutionContextTask *);
172 void didPerformExecutionContextTask(); 172 void didPerformExecutionContextTask();
173 int traceAsyncOperationStarting(ExecutionContext*, const String& operationNa me, int prevOperationId = 0); 173 int traceAsyncOperationStarting(ExecutionContext*, const String& operationNa me, int prevOperationId = 0);
174 void traceAsyncOperationCompleted(ExecutionContext*, int operationId); 174 void traceAsyncOperationCompleted(ExecutionContext*, int operationId);
175 void traceAsyncOperationCompletedCallbackStarting(ExecutionContext*, int ope rationId); 175 void traceAsyncOperationCompletedCallbackStarting(ExecutionContext*, int ope rationId);
176 void traceAsyncCallbackStarting(ExecutionContext*, int operationId); 176 void traceAsyncCallbackStarting(ExecutionContext*, int operationId);
177 void traceAsyncCallbackCompleted(); 177 void traceAsyncCallbackCompleted();
178 bool canBreakProgram(); 178 bool canBreakProgram();
179 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas sRefPtr<JSONObject> data); 179 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas sRefPtr<JSONObject> data);
180 void scriptExecutionBlockedByCSP(const String& directiveText); 180 void scriptExecutionBlockedByCSP(const String& directiveText);
181 void willCallFunction(ExecutionContext*, int scriptId, const String& scriptN ame, int scriptLine);
182 void willEvaluateScript(LocalFrame*, const String& url, int lineNumber);
181 183
182 class Listener : public WillBeGarbageCollectedMixin { 184 class Listener : public WillBeGarbageCollectedMixin {
183 public: 185 public:
184 virtual ~Listener() { } 186 virtual ~Listener() { }
185 virtual void debuggerWasEnabled() = 0; 187 virtual void debuggerWasEnabled() = 0;
186 virtual void debuggerWasDisabled() = 0; 188 virtual void debuggerWasDisabled() = 0;
187 virtual void stepInto() = 0;
188 virtual void didPause() = 0;
189 virtual bool canPauseOnPromiseEvent() = 0; 189 virtual bool canPauseOnPromiseEvent() = 0;
190 virtual void didCreatePromise() = 0; 190 virtual void didCreatePromise() = 0;
191 virtual void didResolvePromise() = 0; 191 virtual void didResolvePromise() = 0;
192 virtual void didRejectPromise() = 0; 192 virtual void didRejectPromise() = 0;
193 }; 193 };
194 void setListener(Listener* listener) { m_listener = listener; } 194 void setListener(Listener* listener) { m_listener = listener; }
195 195
196 bool enabled(); 196 bool enabled();
197 197
198 virtual ScriptDebugServer& scriptDebugServer() = 0; 198 virtual ScriptDebugServer& scriptDebugServer() = 0;
(...skipping 18 matching lines...) Expand all
217 virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrame s, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPr omiseRejection) override final; 217 virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callFrame s, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPr omiseRejection) override final;
218 virtual void didContinue() override final; 218 virtual void didContinue() override final;
219 void reset(); 219 void reset();
220 void pageDidCommitLoad(); 220 void pageDidCommitLoad();
221 221
222 private: 222 private:
223 SkipPauseRequest shouldSkipExceptionPause(); 223 SkipPauseRequest shouldSkipExceptionPause();
224 SkipPauseRequest shouldSkipStepPause(); 224 SkipPauseRequest shouldSkipStepPause();
225 bool isTopCallFrameInFramework(); 225 bool isTopCallFrameInFramework();
226 226
227 void schedulePauseOnNextStatementIfSteppingInto();
227 void cancelPauseOnNextStatement(); 228 void cancelPauseOnNextStatement();
228 void addMessageToConsole(MessageSource, MessageType); 229 void addMessageToConsole(MessageSource, MessageType);
229 230
230 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal lFrames(); 231 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal lFrames();
231 PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace(); 232 PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace();
232 233
233 virtual void didParseSource(const String& scriptId, const Script&, CompileRe sult) override final; 234 virtual void didParseSource(const String& scriptId, const Script&, CompileRe sult) override final;
234 virtual bool v8AsyncTaskEventsEnabled() const override final; 235 virtual bool v8AsyncTaskEventsEnabled() const override final;
235 virtual void didReceiveV8AsyncTaskEvent(ExecutionContext*, const String& eve ntType, const String& eventName, int id) override final; 236 virtual void didReceiveV8AsyncTaskEvent(ExecutionContext*, const String& eve ntType, const String& eventName, int id) override final;
236 virtual bool v8PromiseEventsEnabled() const override final; 237 virtual bool v8PromiseEventsEnabled() const override final;
(...skipping 10 matching lines...) Expand all
247 String sourceMapURLForScript(const Script&, CompileResult); 248 String sourceMapURLForScript(const Script&, CompileResult);
248 249
249 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> topCallFrameSkipUnknownSources(S tring* scriptURL, bool* isBlackboxed); 250 PassRefPtrWillBeRawPtr<JavaScriptCallFrame> topCallFrameSkipUnknownSources(S tring* scriptURL, bool* isBlackboxed);
250 AsyncCallStackTracker& asyncCallStackTracker() const { return *m_asyncCallSt ackTracker; }; 251 AsyncCallStackTracker& asyncCallStackTracker() const { return *m_asyncCallSt ackTracker; };
251 PromiseTracker& promiseTracker() const { return *m_promiseTracker; } 252 PromiseTracker& promiseTracker() const { return *m_promiseTracker; }
252 253
253 typedef HashMap<String, Script> ScriptsMap; 254 typedef HashMap<String, Script> ScriptsMap;
254 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint IdsMap; 255 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint IdsMap;
255 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre akpointToBreakpointIdAndSourceMap; 256 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre akpointToBreakpointIdAndSourceMap;
256 257
258 enum DebuggerStep {
259 NoStep = 0,
260 StepInto,
261 StepOver,
262 StepOut
263 };
264
257 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; 265 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager;
258 InspectorFrontend::Debugger* m_frontend; 266 InspectorFrontend::Debugger* m_frontend;
259 RefPtr<ScriptState> m_pausedScriptState; 267 RefPtr<ScriptState> m_pausedScriptState;
260 ScriptValue m_currentCallStack; 268 ScriptValue m_currentCallStack;
261 ScriptsMap m_scripts; 269 ScriptsMap m_scripts;
262 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo intIds; 270 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo intIds;
263 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; 271 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints;
264 String m_continueToLocationBreakpointId; 272 String m_continueToLocationBreakpointId;
265 InspectorFrontend::Debugger::Reason::Enum m_breakReason; 273 InspectorFrontend::Debugger::Reason::Enum m_breakReason;
266 RefPtr<JSONObject> m_breakAuxData; 274 RefPtr<JSONObject> m_breakAuxData;
275 DebuggerStep m_scheduledDebuggerStep;
267 bool m_javaScriptPauseScheduled; 276 bool m_javaScriptPauseScheduled;
268 bool m_debuggerStepScheduled;
269 bool m_steppingFromFramework; 277 bool m_steppingFromFramework;
270 bool m_pausingOnNativeEvent; 278 bool m_pausingOnNativeEvent;
271 RawPtrWillBeMember<Listener> m_listener; 279 RawPtrWillBeMember<Listener> m_listener;
272 280
273 int m_skippedStepInCount; 281 int m_skippedStepInCount;
274 int m_minFrameCountForSkip; 282 int m_minFrameCountForSkip;
275 bool m_skipAllPauses; 283 bool m_skipAllPauses;
276 bool m_skipContentScripts; 284 bool m_skipContentScripts;
277 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; 285 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp;
278 OwnPtrWillBeMember<AsyncCallStackTracker> m_asyncCallStackTracker; 286 OwnPtrWillBeMember<AsyncCallStackTracker> m_asyncCallStackTracker;
279 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker; 287 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker;
280 }; 288 };
281 289
282 } // namespace blink 290 } // namespace blink
283 291
284 292
285 #endif // !defined(InspectorDebuggerAgent_h) 293 #endif // !defined(InspectorDebuggerAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMDebuggerAgent.cpp ('k') | Source/core/inspector/InspectorDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698