OLD | NEW |
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 class ScriptDebugServer; | 67 class ScriptDebugServer; |
68 class ScriptRegexp; | 68 class ScriptRegexp; |
69 class ScriptSourceCode; | 69 class ScriptSourceCode; |
70 class ScriptValue; | 70 class ScriptValue; |
71 class ThreadableLoaderClient; | 71 class ThreadableLoaderClient; |
72 class XMLHttpRequest; | 72 class XMLHttpRequest; |
73 | 73 |
74 typedef String ErrorString; | 74 typedef String ErrorString; |
75 | 75 |
76 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>
, public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand
Handler { | 76 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent>
, public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand
Handler { |
77 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED; | 77 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); |
| 78 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
78 public: | 79 public: |
79 enum BreakpointSource { | 80 enum BreakpointSource { |
80 UserBreakpointSource, | 81 UserBreakpointSource, |
81 DebugCommandBreakpointSource, | 82 DebugCommandBreakpointSource, |
82 MonitorCommandBreakpointSource | 83 MonitorCommandBreakpointSource |
83 }; | 84 }; |
84 | 85 |
85 static const char backtraceObjectGroup[]; | 86 static const char backtraceObjectGroup[]; |
86 | 87 |
87 virtual ~InspectorDebuggerAgent(); | 88 virtual ~InspectorDebuggerAgent(); |
| 89 virtual void trace(Visitor*); |
88 | 90 |
89 virtual void canSetScriptSource(ErrorString*, bool* result) OVERRIDE FINAL {
*result = true; } | 91 virtual void canSetScriptSource(ErrorString*, bool* result) OVERRIDE FINAL {
*result = true; } |
90 | 92 |
91 virtual void init() OVERRIDE FINAL; | 93 virtual void init() OVERRIDE FINAL; |
92 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 94 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; |
93 virtual void clearFrontend() OVERRIDE FINAL; | 95 virtual void clearFrontend() OVERRIDE FINAL; |
94 virtual void restore() OVERRIDE FINAL; | 96 virtual void restore() OVERRIDE FINAL; |
95 | 97 |
96 bool isPaused(); | 98 bool isPaused(); |
97 bool runningNestedMessageLoop(); | 99 bool runningNestedMessageLoop(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 void didPerformExecutionContextTask(); | 169 void didPerformExecutionContextTask(); |
168 int traceAsyncOperationStarting(ExecutionContext*, const String& operationNa
me); | 170 int traceAsyncOperationStarting(ExecutionContext*, const String& operationNa
me); |
169 void traceAsyncOperationCompleted(ExecutionContext*, int operationId); | 171 void traceAsyncOperationCompleted(ExecutionContext*, int operationId); |
170 void traceAsyncOperationCompletedCallbackStarting(ExecutionContext*, int ope
rationId); | 172 void traceAsyncOperationCompletedCallbackStarting(ExecutionContext*, int ope
rationId); |
171 void traceAsyncCallbackStarting(ExecutionContext*, int operationId); | 173 void traceAsyncCallbackStarting(ExecutionContext*, int operationId); |
172 void traceAsyncCallbackCompleted(); | 174 void traceAsyncCallbackCompleted(); |
173 bool canBreakProgram(); | 175 bool canBreakProgram(); |
174 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas
sRefPtr<JSONObject> data); | 176 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas
sRefPtr<JSONObject> data); |
175 void scriptExecutionBlockedByCSP(const String& directiveText); | 177 void scriptExecutionBlockedByCSP(const String& directiveText); |
176 | 178 |
177 class Listener { | 179 class Listener : public WillBeGarbageCollectedMixin { |
178 public: | 180 public: |
179 virtual ~Listener() { } | 181 virtual ~Listener() { } |
180 virtual void debuggerWasEnabled() = 0; | 182 virtual void debuggerWasEnabled() = 0; |
181 virtual void debuggerWasDisabled() = 0; | 183 virtual void debuggerWasDisabled() = 0; |
182 virtual void stepInto() = 0; | 184 virtual void stepInto() = 0; |
183 virtual void didPause() = 0; | 185 virtual void didPause() = 0; |
184 }; | 186 }; |
185 void setListener(Listener* listener) { m_listener = listener; } | 187 void setListener(Listener* listener) { m_listener = listener; } |
186 | 188 |
187 bool enabled(); | 189 bool enabled(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 void clearBreakDetails(); | 235 void clearBreakDetails(); |
234 | 236 |
235 String sourceMapURLForScript(const Script&, CompileResult); | 237 String sourceMapURLForScript(const Script&, CompileResult); |
236 | 238 |
237 String scriptURL(JavaScriptCallFrame*); | 239 String scriptURL(JavaScriptCallFrame*); |
238 | 240 |
239 typedef HashMap<String, Script> ScriptsMap; | 241 typedef HashMap<String, Script> ScriptsMap; |
240 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; | 242 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; |
241 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; | 243 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; |
242 | 244 |
| 245 // FIXME: Oilpan: Move InjectedScriptManager to heap in follow-up CL. |
243 InjectedScriptManager* m_injectedScriptManager; | 246 InjectedScriptManager* m_injectedScriptManager; |
244 InspectorFrontend::Debugger* m_frontend; | 247 InspectorFrontend::Debugger* m_frontend; |
245 RefPtr<ScriptState> m_pausedScriptState; | 248 RefPtr<ScriptState> m_pausedScriptState; |
246 ScriptValue m_currentCallStack; | 249 ScriptValue m_currentCallStack; |
247 ScriptsMap m_scripts; | 250 ScriptsMap m_scripts; |
248 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; | 251 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; |
249 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; | 252 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; |
250 String m_continueToLocationBreakpointId; | 253 String m_continueToLocationBreakpointId; |
251 InspectorFrontend::Debugger::Reason::Enum m_breakReason; | 254 InspectorFrontend::Debugger::Reason::Enum m_breakReason; |
252 RefPtr<JSONObject> m_breakAuxData; | 255 RefPtr<JSONObject> m_breakAuxData; |
253 bool m_javaScriptPauseScheduled; | 256 bool m_javaScriptPauseScheduled; |
254 bool m_debuggerStepScheduled; | 257 bool m_debuggerStepScheduled; |
255 bool m_steppingFromFramework; | 258 bool m_steppingFromFramework; |
256 bool m_pausingOnNativeEvent; | 259 bool m_pausingOnNativeEvent; |
257 Listener* m_listener; | 260 RawPtrWillBeMember<Listener> m_listener; |
258 | 261 |
259 int m_skippedStepInCount; | 262 int m_skippedStepInCount; |
260 int m_minFrameCountForSkip; | 263 int m_minFrameCountForSkip; |
261 bool m_skipAllPauses; | 264 bool m_skipAllPauses; |
262 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; | 265 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; |
263 AsyncCallStackTracker m_asyncCallStackTracker; | 266 AsyncCallStackTracker m_asyncCallStackTracker; |
264 }; | 267 }; |
265 | 268 |
266 } // namespace blink | 269 } // namespace blink |
267 | 270 |
268 | 271 |
269 #endif // !defined(InspectorDebuggerAgent_h) | 272 #endif // !defined(InspectorDebuggerAgent_h) |
OLD | NEW |