| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 virtual void startListeningScriptDebugServer() = 0; | 191 virtual void startListeningScriptDebugServer() = 0; |
| 192 virtual void stopListeningScriptDebugServer() = 0; | 192 virtual void stopListeningScriptDebugServer() = 0; |
| 193 virtual void muteConsole() = 0; | 193 virtual void muteConsole() = 0; |
| 194 virtual void unmuteConsole() = 0; | 194 virtual void unmuteConsole() = 0; |
| 195 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } | 195 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana
ger; } |
| 196 virtual InjectedScript& injectedScriptForEval(ErrorString*, const int* execu
tionContextId) = 0; | 196 virtual InjectedScript& injectedScriptForEval(ErrorString*, const int* execu
tionContextId) = 0; |
| 197 | 197 |
| 198 virtual void enable(); | 198 virtual void enable(); |
| 199 virtual void disable(); | 199 virtual void disable(); |
| 200 virtual SkipPauseRequest didPause(ScriptState*, const StackTrace& callFrames
, const ScriptValue& exception, const Vector<String>& hitBreakpoints) OVERRIDE F
INAL; | 200 virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& exception
, const Vector<String>& hitBreakpoints) OVERRIDE FINAL; |
| 201 virtual void didContinue() OVERRIDE FINAL; | 201 virtual void didContinue() OVERRIDE FINAL; |
| 202 void reset(); | 202 void reset(); |
| 203 void pageDidCommitLoad(); | 203 void pageDidCommitLoad(); |
| 204 | 204 |
| 205 private: | 205 private: |
| 206 SkipPauseRequest shouldSkipExceptionPause(); | 206 SkipPauseRequest shouldSkipExceptionPause(); |
| 207 SkipPauseRequest shouldSkipStepPause(); | 207 SkipPauseRequest shouldSkipStepPause(); |
| 208 | 208 |
| 209 void cancelPauseOnNextStatement(); | 209 void cancelPauseOnNextStatement(); |
| 210 void addMessageToConsole(MessageSource, MessageType); | 210 void addMessageToConsole(MessageSource, MessageType); |
| 211 | 211 |
| 212 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal
lFrames(); | 212 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCal
lFrames(); |
| 213 PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > callFrames
(StackTraces, int asyncOrdinal); |
| 214 |
| 213 PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace(); | 215 PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace(); |
| 214 | 216 |
| 215 virtual void didParseSource(const String& scriptId, const Script&) OVERRIDE
FINAL; | 217 virtual void didParseSource(const String& scriptId, const Script&) OVERRIDE
FINAL; |
| 216 virtual void failedToParseSource(const String& url, const String& data, int
firstLine, int errorLine, const String& errorMessage) OVERRIDE FINAL; | 218 virtual void failedToParseSource(const String& url, const String& data, int
firstLine, int errorLine, const String& errorMessage) OVERRIDE FINAL; |
| 217 | 219 |
| 218 void setPauseOnExceptionsImpl(ErrorString*, int); | 220 void setPauseOnExceptionsImpl(ErrorString*, int); |
| 219 | 221 |
| 220 PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String&
breakpointId, const String& scriptId, const ScriptBreakpoint&, BreakpointSource)
; | 222 PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String&
breakpointId, const String& scriptId, const ScriptBreakpoint&, BreakpointSource)
; |
| 221 void removeBreakpoint(const String& breakpointId); | 223 void removeBreakpoint(const String& breakpointId); |
| 222 void clear(); | 224 void clear(); |
| 223 bool assertPaused(ErrorString*); | 225 bool assertPaused(ErrorString*); |
| 224 void clearBreakDetails(); | 226 void clearBreakDetails(); |
| 225 | 227 |
| 226 String sourceMapURLForScript(const Script&); | 228 String sourceMapURLForScript(const Script&); |
| 227 | 229 |
| 228 void collectAsyncCallStacks(Vector<StackTrace>& asyncCallStacks); | 230 void collectAsyncCallStacks(Vector<StackTrace>& asyncCallStacks, ScriptState
* scriptState); |
| 229 | 231 |
| 230 typedef HashMap<String, Script> ScriptsMap; | 232 typedef HashMap<String, Script> ScriptsMap; |
| 231 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; | 233 typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpoint
IdsMap; |
| 232 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; | 234 typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBre
akpointToBreakpointIdAndSourceMap; |
| 233 | 235 |
| 234 InjectedScriptManager* m_injectedScriptManager; | 236 InjectedScriptManager* m_injectedScriptManager; |
| 235 InspectorFrontend::Debugger* m_frontend; | 237 InspectorFrontend::Debugger* m_frontend; |
| 236 RefPtr<ScriptState> m_pausedScriptState; | 238 RefPtr<ScriptState> m_pausedScriptState; |
| 237 StackTrace m_currentCallStack; | 239 StackTraces m_currentCallStack; |
| 238 ScriptsMap m_scripts; | 240 ScriptsMap m_scripts; |
| 239 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; | 241 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo
intIds; |
| 240 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; | 242 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; |
| 241 String m_continueToLocationBreakpointId; | 243 String m_continueToLocationBreakpointId; |
| 242 InspectorFrontend::Debugger::Reason::Enum m_breakReason; | 244 InspectorFrontend::Debugger::Reason::Enum m_breakReason; |
| 243 RefPtr<JSONObject> m_breakAuxData; | 245 RefPtr<JSONObject> m_breakAuxData; |
| 244 bool m_javaScriptPauseScheduled; | 246 bool m_javaScriptPauseScheduled; |
| 245 bool m_debuggerStepScheduled; | 247 bool m_debuggerStepScheduled; |
| 246 bool m_pausingOnNativeEvent; | 248 bool m_pausingOnNativeEvent; |
| 247 Listener* m_listener; | 249 Listener* m_listener; |
| 248 | 250 |
| 249 int m_skippedStepInCount; | 251 int m_skippedStepInCount; |
| 250 int m_minFrameCountForSkip; | 252 int m_minFrameCountForSkip; |
| 251 bool m_skipAllPauses; | 253 bool m_skipAllPauses; |
| 252 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; | 254 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; |
| 253 AsyncCallStackTracker m_asyncCallStackTracker; | 255 AsyncCallStackTracker m_asyncCallStackTracker; |
| 254 }; | 256 }; |
| 255 | 257 |
| 256 } // namespace WebCore | 258 } // namespace WebCore |
| 257 | 259 |
| 258 | 260 |
| 259 #endif // !defined(InspectorDebuggerAgent_h) | 261 #endif // !defined(InspectorDebuggerAgent_h) |
| OLD | NEW |