Changeset 86581 in webkit
- Timestamp:
- May 16, 2011 9:58:15 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86566 r86581 1 2011-05-16 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: debuggerWasEnabled notification should not be send to front-end on navigation. 6 https://bugs.webkit.org/show_bug.cgi?id=60888 7 8 * inspector/InspectorController.cpp: 9 (WebCore::InspectorController::disableDebugger): 10 * inspector/InspectorDebuggerAgent.cpp: 11 (WebCore::InspectorDebuggerAgent::enable): 12 (WebCore::InspectorDebuggerAgent::disable): 13 (WebCore::InspectorDebuggerAgent::restore): 14 (WebCore::InspectorDebuggerAgent::clearFrontend): 15 * inspector/InspectorDebuggerAgent.h: 16 1 17 2011-05-16 Yury Semikhatsky <yurys@chromium.org> 2 18 -
trunk/Source/WebCore/inspector/InspectorController.cpp
r86564 r86581 448 448 void InspectorController::disableDebugger() 449 449 { 450 m_debuggerAgent->disable(); 450 ErrorString error; 451 m_debuggerAgent->disable(&error); 451 452 } 452 453 -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r86542 r86581 65 65 } 66 66 67 void InspectorDebuggerAgent::enable(bool restoringFromState) 68 { 69 ASSERT(m_frontend); 70 if (!restoringFromState && enabled()) 71 return; 72 m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, true); 67 void InspectorDebuggerAgent::enable() 68 { 73 69 m_instrumentingAgents->setInspectorDebuggerAgent(this); 74 70 75 scriptDebugServer().clearBreakpoints();76 71 // FIXME(WK44513): breakpoints activated flag should be synchronized between all front-ends 77 72 scriptDebugServer().setBreakpointsActivated(true); 78 73 startListeningScriptDebugServer(); 79 74 80 m_frontend->debuggerWasEnabled();81 75 if (m_listener) 82 76 m_listener->debuggerWasEnabled(); … … 85 79 void InspectorDebuggerAgent::disable() 86 80 { 87 if (!enabled())88 return;89 m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, false);90 81 m_inspectorState->setObject(DebuggerAgentState::javaScriptBreakpoints, InspectorObject::create()); 91 82 m_instrumentingAgents->setInspectorDebuggerAgent(0); 92 83 93 84 stopListeningScriptDebugServer(); 85 scriptDebugServer().clearBreakpoints(); 94 86 clear(); 87 88 if (m_listener) 89 m_listener->debuggerWasDisabled(); 90 } 91 92 bool InspectorDebuggerAgent::enabled() 93 { 94 return m_inspectorState->getBoolean(DebuggerAgentState::debuggerEnabled); 95 } 96 97 void InspectorDebuggerAgent::enable(ErrorString*) 98 { 99 if (enabled()) 100 return; 101 102 enable(); 103 m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, true); 104 105 ASSERT(m_frontend); 106 m_frontend->debuggerWasEnabled(); 107 } 108 109 void InspectorDebuggerAgent::disable(ErrorString*) 110 { 111 if (!enabled()) 112 return; 113 114 disable(); 115 m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, false); 95 116 96 117 if (m_frontend) 97 118 m_frontend->debuggerWasDisabled(); 98 if (m_listener)99 m_listener->debuggerWasDisabled();100 }101 102 bool InspectorDebuggerAgent::enabled()103 {104 return m_inspectorState->getBoolean(DebuggerAgentState::debuggerEnabled);105 119 } 106 120 107 121 void InspectorDebuggerAgent::restore() 108 122 { 109 if ( m_inspectorState->getBoolean(DebuggerAgentState::debuggerEnabled))110 enable( true);123 if (enabled()) 124 enable(); 111 125 } 112 126 … … 122 136 if (!enabled()) 123 137 return; 124 // If the window is being closed with the debugger enabled, 125 // remember this state to re-enable debugger on the next window 126 // opening. 138 127 139 disable(); 140 141 // FIXME: due to m_state->mute() hack in InspectorController, debuggerEnabled is actually set to false only 142 // in InspectorState, but not in cookie. That's why after navigation debuggerEnabled will be true, 143 // but after front-end re-open it will still be false. 144 m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, false); 128 145 } 129 146 -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h
r85321 r86581 69 69 virtual ~InspectorDebuggerAgent(); 70 70 71 void enable(ErrorString*) { enable(false); } 72 void disable(ErrorString*) { disable(); } 73 void disable(); 71 void enable(ErrorString*); 72 void disable(ErrorString*); 74 73 bool enabled(); 75 74 void restore(); … … 117 116 118 117 private: 119 void enable(bool restoringFromState); 118 void enable(); 119 void disable(); 120 120 121 121 PassRefPtr<InspectorArray> currentCallFrames();
Note: See TracChangeset
for help on using the changeset viewer.