Changeset 55464 in webkit
- Timestamp:
- Mar 3, 2010 9:24:38 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55463 r55464 1 2010-03-03 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Get rid of synchronous debuggerEnabled, profilerEnabled calls. 6 7 https://bugs.webkit.org/show_bug.cgi?id=32331 8 9 * inspector/InspectorBackend.cpp: 10 * inspector/InspectorBackend.h: 11 * inspector/InspectorBackend.idl: 12 * inspector/front-end/BreakpointsSidebarPane.js: 13 (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): 14 (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint): 15 (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged): 16 * inspector/front-end/ProfilesPanel.js: 17 (WebInspector.ProfilesPanel): 18 (WebInspector.ProfilesPanel.prototype.profilerWasEnabled): 19 (WebInspector.ProfilesPanel.prototype.profilerWasDisabled): 20 (WebInspector.ProfilesPanel.prototype._updateInterface): 21 (WebInspector.ProfilesPanel.prototype._enableProfiling): 22 (WebInspector.ProfilesPanel.prototype._toggleProfiling): 23 * inspector/front-end/ScriptsPanel.js: 24 (WebInspector.ScriptsPanel): 25 (WebInspector.ScriptsPanel.prototype.debuggerWasEnabled): 26 (WebInspector.ScriptsPanel.prototype.debuggerWasDisabled): 27 (WebInspector.ScriptsPanel.prototype.reset): 28 (WebInspector.ScriptsPanel.prototype.canShowSourceLine): 29 (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): 30 (WebInspector.ScriptsPanel.prototype._enableDebugging): 31 (WebInspector.ScriptsPanel.prototype._toggleDebugging): 32 1 33 2010-03-03 Eric Carlson <eric.carlson@apple.com> 2 34 -
trunk/WebCore/inspector/InspectorBackend.cpp
r55347 r55464 156 156 157 157 #if ENABLE(JAVASCRIPT_DEBUGGER) 158 bool InspectorBackend::debuggerEnabled() const159 {160 if (m_inspectorController)161 return m_inspectorController->debuggerEnabled();162 return false;163 }164 158 165 159 void InspectorBackend::enableDebugger(bool always) … … 236 230 237 231 #if ENABLE(JAVASCRIPT_DEBUGGER) 238 bool InspectorBackend::profilerEnabled()239 {240 if (m_inspectorController)241 return m_inspectorController->profilerEnabled();242 return false;243 }244 232 245 233 void InspectorBackend::enableProfiler(bool always) -
trunk/WebCore/inspector/InspectorBackend.h
r55347 r55464 75 75 76 76 #if ENABLE(JAVASCRIPT_DEBUGGER) 77 bool debuggerEnabled() const;78 77 void enableDebugger(bool always); 79 78 void disableDebugger(bool always); … … 94 93 void stepOutOfFunctionInDebugger(); 95 94 96 bool profilerEnabled();97 95 void enableProfiler(bool always); 98 96 void disableProfiler(bool always); -
trunk/WebCore/inspector/InspectorBackend.idl
r55347 r55464 50 50 51 51 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 52 boolean debuggerEnabled();53 52 void enableDebugger(in boolean always); 54 53 void disableDebugger(in boolean always); … … 69 68 void setPauseOnExceptionsState(in long pauseOnExceptionsState); 70 69 71 boolean profilerEnabled();72 70 void enableProfiler(in boolean always); 73 71 void disableProfiler(in boolean always); -
trunk/WebCore/inspector/InspectorController.cpp
r55347 r55464 691 691 #endif 692 692 693 if (m_profilerEnabled) 694 m_frontend->profilerWasEnabled(); 695 693 696 m_frontend->populateInterface(); 694 697 -
trunk/WebCore/inspector/front-end/BreakpointsSidebarPane.js
r55071 r55464 69 69 } 70 70 71 if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) 72 return; 73 74 if (breakpoint.enabled) 75 InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition); 71 InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition); 76 72 }, 77 73 … … 146 142 } 147 143 148 if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)149 return;150 151 144 InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line); 152 145 }, … … 158 151 var checkbox = breakpoint._breakpointListElement.firstChild; 159 152 checkbox.checked = breakpoint.enabled; 160 161 if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)162 return;163 164 153 InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition); 165 154 }, -
trunk/WebCore/inspector/front-end/ProfilesPanel.js
r53996 r55464 121 121 122 122 this._profiles = []; 123 this._profilerEnabled = Preferences.profilerAlwaysEnabled; 123 124 this.reset(); 124 125 } … … 172 173 profilerWasEnabled: function() 173 174 { 175 if (this._profilerEnabled) 176 return; 177 178 this._profilerEnabled = true; 174 179 this.reset(); 175 180 this.populateInterface(); … … 178 183 profilerWasDisabled: function() 179 184 { 185 if (!this._profilerEnabled) 186 return; 187 188 this._profilerEnabled = false; 180 189 this.reset(); 181 190 }, … … 430 439 { 431 440 // FIXME: Replace ProfileType-specific button visibility changes by a single ProfileType-agnostic "combo-button" visibility change. 432 if ( InspectorBackend.profilerEnabled()) {441 if (this._profilerEnabled) { 433 442 this.enableToggleButton.title = WebInspector.UIString("Profiling enabled. Click to disable."); 434 443 this.enableToggleButton.toggled = true; … … 449 458 _enableProfiling: function() 450 459 { 451 if ( InspectorBackend.profilerEnabled())460 if (this._profilerEnabled) 452 461 return; 453 462 this._toggleProfiling(this.panelEnablerView.alwaysEnabled); … … 456 465 _toggleProfiling: function(optionalAlways) 457 466 { 458 if ( InspectorBackend.profilerEnabled())467 if (this._profilerEnabled) 459 468 InspectorBackend.disableProfiler(true); 460 469 else -
trunk/WebCore/inspector/front-end/ScriptsPanel.js
r55241 r55464 196 196 this._shortcuts[shortcut] = handler; 197 197 198 this._debuggerEnabled = Preferences.debuggerAlwaysEnabled; 198 199 this.reset(); 199 200 } … … 419 420 debuggerWasEnabled: function() 420 421 { 422 if (this._debuggerEnabled) 423 return; 424 425 this._debuggerEnabled = true; 421 426 this.reset(); 422 427 }, … … 424 429 debuggerWasDisabled: function() 425 430 { 431 if (!this._debuggerEnabled) 432 return; 433 434 this._debuggerEnabled = false; 426 435 this.reset(); 427 436 }, … … 434 443 this.searchCanceled(); 435 444 436 if (! InspectorBackend.debuggerEnabled()) {445 if (!this._debuggerEnabled) { 437 446 this._paused = false; 438 447 this._waitingToPause = false; … … 492 501 canShowSourceLine: function(url, line) 493 502 { 494 if (! InspectorBackend.debuggerEnabled())503 if (!this._debuggerEnabled) 495 504 return false; 496 505 return !!this._scriptOrResourceForURLAndLine(url, line); … … 798 807 _updateDebuggerButtons: function() 799 808 { 800 if ( InspectorBackend.debuggerEnabled()) {809 if (this._debuggerEnabled) { 801 810 this.enableToggleButton.title = WebInspector.UIString("Debugging enabled. Click to disable."); 802 811 this.enableToggleButton.toggled = true; … … 877 886 _enableDebugging: function() 878 887 { 879 if ( InspectorBackend.debuggerEnabled())888 if (this._debuggerEnabled) 880 889 return; 881 890 this._toggleDebugging(this.panelEnablerView.alwaysEnabled); … … 888 897 this._stepping = false; 889 898 890 if ( InspectorBackend.debuggerEnabled())899 if (this._debuggerEnabled) 891 900 InspectorBackend.disableDebugger(true); 892 901 else -
trunk/WebCore/inspector/front-end/Settings.js
r54702 r55464 39 39 showMissingLocalizedStrings: false, 40 40 samplingCPUProfiler: false, 41 showColorNicknames: true 41 showColorNicknames: true, 42 debuggerAlwaysEnabled: false, 43 profilerAlwaysEnabled: false 42 44 } 43 45 -
trunk/WebCore/inspector/front-end/inspector.js
r55347 r55464 633 633 var profileString = WebInspector.ProfileType.URLRegExp.exec(anchor.href); 634 634 if (profileString) 635 WebInspector.showProfile (anchor.href, anchor.lineNumber);635 WebInspector.showProfileForURL(anchor.href); 636 636 } 637 637 } -
trunk/WebKit/chromium/src/js/DevTools.js
r55364 r55464 201 201 Preferences.samplingCPUProfiler = true; 202 202 Preferences.heapProfilerPresent = true; 203 Preferences.debuggerAlwaysEnabled = true; 204 Preferences.profilerAlwaysEnabled = true; 203 205 oldLoaded.call(this); 204 206
Note: See TracChangeset
for help on using the changeset viewer.