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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 }; | 62 }; |
63 | 63 |
64 const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace"; | 64 const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace"; |
65 | 65 |
66 static String generateBreakpointId(const String& scriptId, int lineNumber, int c
olumnNumber, InspectorDebuggerAgent::BreakpointSource source) | 66 static String generateBreakpointId(const String& scriptId, int lineNumber, int c
olumnNumber, InspectorDebuggerAgent::BreakpointSource source) |
67 { | 67 { |
68 return scriptId + ':' + String::number(lineNumber) + ':' + String::number(co
lumnNumber) + | 68 return scriptId + ':' + String::number(lineNumber) + ':' + String::number(co
lumnNumber) + |
69 (source == InspectorDebuggerAgent::UserBreakpointSource ? String() : Str
ing(":debug")); | 69 (source == InspectorDebuggerAgent::UserBreakpointSource ? String() : Str
ing(":debug")); |
70 } | 70 } |
71 | 71 |
72 InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentin
gAgents, InspectorCompositeState* inspectorState, InjectedScriptManager* injecte
dScriptManager) | 72 InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentin
gAgents, InspectorState* inspectorState, InjectedScriptManager* injectedScriptMa
nager) |
73 : InspectorBaseAgent<InspectorDebuggerAgent>("Debugger", instrumentingAgents
, inspectorState) | 73 : InspectorBaseAgent(instrumentingAgents, inspectorState) |
74 , m_injectedScriptManager(injectedScriptManager) | 74 , m_injectedScriptManager(injectedScriptManager) |
75 , m_frontend(0) | 75 , m_frontend(0) |
76 , m_pausedScriptState(0) | 76 , m_pausedScriptState(0) |
77 , m_javaScriptPauseScheduled(false) | 77 , m_javaScriptPauseScheduled(false) |
78 , m_listener(0) | 78 , m_listener(0) |
79 { | 79 { |
80 // FIXME: make breakReason optional so that there was no need to init it wit
h "other". | 80 // FIXME: make breakReason optional so that there was no need to init it wit
h "other". |
81 clearBreakDetails(); | 81 clearBreakDetails(); |
82 m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServ
er::DontPauseOnExceptions); | 82 m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServ
er::DontPauseOnExceptions); |
83 } | 83 } |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 | 801 |
802 void InspectorDebuggerAgent::clearBreakDetails() | 802 void InspectorDebuggerAgent::clearBreakDetails() |
803 { | 803 { |
804 m_breakReason = InspectorFrontend::Debugger::Reason::Other; | 804 m_breakReason = InspectorFrontend::Debugger::Reason::Other; |
805 m_breakAuxData = 0; | 805 m_breakAuxData = 0; |
806 } | 806 } |
807 | 807 |
808 void InspectorDebuggerAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const | 808 void InspectorDebuggerAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const |
809 { | 809 { |
810 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDe
buggerAgent); | 810 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDe
buggerAgent); |
811 InspectorBaseAgent<InspectorDebuggerAgent>::reportMemoryUsage(memoryObjectIn
fo); | 811 InspectorBaseAgent::reportMemoryUsage(memoryObjectInfo); |
812 info.addMember(m_injectedScriptManager, "injectedScriptManager"); | 812 info.addMember(m_injectedScriptManager, "injectedScriptManager"); |
813 info.addWeakPointer(m_frontend); | 813 info.addWeakPointer(m_frontend); |
814 info.addMember(m_pausedScriptState, "pausedScriptState"); | 814 info.addMember(m_pausedScriptState, "pausedScriptState"); |
815 info.addMember(m_currentCallStack, "currentCallStack"); | 815 info.addMember(m_currentCallStack, "currentCallStack"); |
816 info.addMember(m_scripts, "scripts"); | 816 info.addMember(m_scripts, "scripts"); |
817 info.addMember(m_breakpointIdToDebugServerBreakpointIds, "breakpointIdToDebu
gServerBreakpointIds"); | 817 info.addMember(m_breakpointIdToDebugServerBreakpointIds, "breakpointIdToDebu
gServerBreakpointIds"); |
818 info.addMember(m_continueToLocationBreakpointId, "continueToLocationBreakpoi
ntId"); | 818 info.addMember(m_continueToLocationBreakpointId, "continueToLocationBreakpoi
ntId"); |
819 info.addMember(m_breakAuxData, "breakAuxData"); | 819 info.addMember(m_breakAuxData, "breakAuxData"); |
820 info.addWeakPointer(m_listener); | 820 info.addWeakPointer(m_listener); |
821 } | 821 } |
(...skipping 21 matching lines...) Expand all Loading... |
843 void InspectorDebuggerAgent::reset() | 843 void InspectorDebuggerAgent::reset() |
844 { | 844 { |
845 m_scripts.clear(); | 845 m_scripts.clear(); |
846 m_breakpointIdToDebugServerBreakpointIds.clear(); | 846 m_breakpointIdToDebugServerBreakpointIds.clear(); |
847 if (m_frontend) | 847 if (m_frontend) |
848 m_frontend->globalObjectCleared(); | 848 m_frontend->globalObjectCleared(); |
849 } | 849 } |
850 | 850 |
851 } // namespace WebCore | 851 } // namespace WebCore |
852 | 852 |
OLD | NEW |