Changeset 76770 in webkit
- Timestamp:
- Jan 27, 2011 12:36:21 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r76661 r76770 1174 1174 inspector/InspectorResourceAgent.cpp 1175 1175 inspector/InspectorRuntimeAgent.cpp 1176 inspector/InspectorSettings.cpp1177 1176 inspector/InspectorState.cpp 1178 1177 inspector/InspectorStyleSheet.cpp -
trunk/Source/WebCore/ChangeLog
r76768 r76770 1 2011-01-26 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: store all settings related to the agents on the frontend side 6 https://bugs.webkit.org/show_bug.cgi?id=53174 7 8 * CMakeLists.txt: 9 * GNUmakefile.am: 10 * WebCore.exp.in: 11 * WebCore.gypi: 12 * WebCore.pro: 13 * WebCore.vcproj/WebCore.vcproj: 14 * WebCore.xcodeproj/project.pbxproj: 15 * inspector/Inspector.idl: 16 * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored 17 on the front-end side and will be pushed to the backend when the frontend is loaded. 18 (WebCore::InspectorAgent::InspectorAgent): 19 (WebCore::InspectorAgent::disconnectFrontend): 20 (WebCore::InspectorAgent::restoreDebugger): 21 (WebCore::InspectorAgent::restoreProfiler): 22 (WebCore::InspectorAgent::enableProfiler): 23 (WebCore::InspectorAgent::disableProfiler): 24 (WebCore::InspectorAgent::showAndEnableDebugger): 25 (WebCore::InspectorAgent::enableDebugger): 26 (WebCore::InspectorAgent::disableDebugger): 27 * inspector/InspectorAgent.h: 28 * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only 29 if the front-end was opened during current browser session and XHR logging is turned on 30 there. 31 (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled): 32 (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled): 33 * inspector/InspectorInstrumentation.cpp: 34 (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl): 35 (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): 36 * inspector/InspectorProfilerAgent.cpp: 37 (WebCore::InspectorProfilerAgent::enable): 38 (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling): 39 * inspector/InspectorProfilerAgent.h: 40 * inspector/InspectorSettings.cpp: Removed. 41 * inspector/InspectorSettings.h: Removed. 42 * inspector/InspectorState.cpp: 43 (WebCore::InspectorState::InspectorState): 44 * inspector/InspectorState.h: 45 * inspector/front-end/ConsoleView.js: 46 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared): 47 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher): 48 (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction): 49 (WebInspector.ConsoleView.prototype._handleContextMenuEvent): 50 * inspector/front-end/ProfilesPanel.js: 51 (WebInspector.ProfilesPanel.prototype._toggleProfiling): 52 * inspector/front-end/ScriptsPanel.js: 53 (WebInspector.ScriptsPanel.prototype._toggleDebugging): 54 * inspector/front-end/Settings.js: 55 (WebInspector.Settings): 56 * inspector/front-end/inspector.js: 57 1 58 2011-01-27 Dan Bernstein <mitz@apple.com> 2 59 -
trunk/Source/WebCore/GNUmakefile.am
r76661 r76770 1995 1995 Source/WebCore/inspector/InspectorRuntimeAgent.cpp \ 1996 1996 Source/WebCore/inspector/InspectorRuntimeAgent.h \ 1997 Source/WebCore/inspector/InspectorSettings.cpp \1998 Source/WebCore/inspector/InspectorSettings.h \1999 1997 Source/WebCore/inspector/InspectorState.cpp \ 2000 1998 Source/WebCore/inspector/InspectorState.h \ -
trunk/Source/WebCore/WebCore.exp.in
r76756 r76770 1369 1369 __ZN7WebCore14InspectorAgent12ConsolePanelE 1370 1370 __ZN7WebCore14InspectorAgent13ProfilesPanelE 1371 __ZN7WebCore14InspectorAgent14enableProfilerE bb1372 __ZN7WebCore14InspectorAgent15disableDebuggerE b1373 __ZN7WebCore14InspectorAgent15disableProfilerE b1371 __ZN7WebCore14InspectorAgent14enableProfilerEv 1372 __ZN7WebCore14InspectorAgent15disableDebuggerEv 1373 __ZN7WebCore14InspectorAgent15disableProfilerEv 1374 1374 __ZN7WebCore14InspectorAgent18disconnectFrontendEv 1375 1375 __ZN7WebCore14InspectorAgent20stopTimelineProfilerEv -
trunk/Source/WebCore/WebCore.gypi
r76661 r76770 2050 2050 'inspector/InspectorRuntimeAgent.h', 2051 2051 'inspector/InspectorState.cpp', 2052 'inspector/InspectorSettings.h',2053 'inspector/InspectorSettings.cpp',2054 2052 'inspector/InspectorState.h', 2055 2053 'inspector/InspectorStyleSheet.cpp', -
trunk/Source/WebCore/WebCore.pro
r76661 r76770 1063 1063 inspector/InspectorResourceAgent.cpp \ 1064 1064 inspector/InspectorRuntimeAgent.cpp \ 1065 inspector/InspectorSettings.cpp \1066 1065 inspector/InspectorState.cpp \ 1067 1066 inspector/InspectorStyleSheet.cpp \ … … 1963 1962 inspector/InspectorResourceAgent.h \ 1964 1963 inspector/InspectorRuntimeAgent.h \ 1965 inspector/InspectorSettings.h \1966 1964 inspector/InspectorState.h \ 1967 1965 inspector/InspectorStyleSheet.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r76661 r76770 65255 65255 </File> 65256 65256 <File 65257 RelativePath="..\inspector\InspectorSettings.cpp"65258 >65259 </File>65260 <File65261 RelativePath="..\inspector\InspectorSettings.h"65262 >65263 </File>65264 <File65265 65257 RelativePath="..\inspector\InspectorState.cpp" 65266 65258 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r76745 r76770 1660 1660 7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */; }; 1661 1661 7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1662 7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */; };1663 7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */; };1664 1662 7A674BDB0F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */; }; 1665 1663 7A674BDC0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */; }; … … 8104 8102 7A563E5412DE32B000F4536D /* InjectedScriptSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptSource.h; sourceTree = "<group>"; }; 8105 8103 7A563F9512DF5C9100F4536D /* InjectedScriptSource.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InjectedScriptSource.js; sourceTree = "<group>"; }; 8106 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorSettings.cpp; sourceTree = "<group>"; };8107 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorSettings.h; sourceTree = "<group>"; };8108 8104 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroupLoadDeferrer.cpp; sourceTree = "<group>"; }; 8109 8105 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroupLoadDeferrer.h; sourceTree = "<group>"; }; … … 13027 13023 7AA365ED12E7265400DCA242 /* InspectorRuntimeAgent.cpp */, 13028 13024 7AF11A5912E727490061F23C /* InspectorRuntimeAgent.h */, 13029 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */,13030 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */,13031 13025 4FA3B908125CD12100300BAD /* InspectorState.cpp */, 13032 13026 4FA3B909125CD12200300BAD /* InspectorState.h */, … … 20929 20923 82AB1776125C826700C5069D /* InspectorResourceAgent.h in Headers */, 20930 20924 7AF11A5A12E727490061F23C /* InspectorRuntimeAgent.h in Headers */, 20931 7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */,20932 20925 4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */, 20933 20926 82AB1774125C826700C5069D /* InspectorStyleSheet.h in Headers */, … … 23673 23666 82AB1775125C826700C5069D /* InspectorResourceAgent.cpp in Sources */, 23674 23667 7AA365EE12E7265400DCA242 /* InspectorRuntimeAgent.cpp in Sources */, 23675 7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */,23676 23668 4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */, 23677 23669 82AB1773125C826700C5069D /* InspectorStyleSheet.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp
r76518 r76770 118 118 } 119 119 120 bool ScriptDebugServer::isDebuggerAlwaysEnabled()121 {122 return false;123 }124 125 120 bool ScriptDebugServer::hasListenersInterestedInPage(Page* page) 126 121 { -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.h
r76518 r76770 94 94 JavaScriptCallFrame* currentCallFrame(); 95 95 96 bool isDebuggerAlwaysEnabled();97 98 96 private: 99 97 typedef HashSet<ScriptDebugListener*> ListenerSet; -
trunk/Source/WebCore/bindings/js/ScriptProfiler.cpp
r65797 r76770 47 47 } 48 48 49 bool ScriptProfiler::isProfilerAlwaysEnabled()50 {51 return false;52 }53 54 49 } // namespace WebCore 55 50 -
trunk/Source/WebCore/bindings/js/ScriptProfiler.h
r76597 r76770 51 51 static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title); 52 52 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&, HeapSnapshotProgress*) { return 0; } 53 static bool isProfilerAlwaysEnabled();54 53 }; 55 54 -
trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
r76509 r76770 343 343 } 344 344 345 bool ScriptDebugServer::isDebuggerAlwaysEnabled()346 {347 return m_enabled;348 }349 350 345 void ScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task) 351 346 { -
trunk/Source/WebCore/bindings/v8/ScriptDebugServer.h
r76509 r76770 100 100 101 101 void setEnabled(bool); 102 bool isDebuggerAlwaysEnabled();103 102 104 103 class Task { -
trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp
r76597 r76770 91 91 } 92 92 93 bool ScriptProfiler::isProfilerAlwaysEnabled()94 {95 return true;96 }97 98 93 } // namespace WebCore -
trunk/Source/WebCore/bindings/v8/ScriptProfiler.h
r76597 r76770 57 57 static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title); 58 58 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*); 59 static bool isProfilerAlwaysEnabled();60 59 }; 61 60 -
trunk/Source/WebCore/inspector/Inspector.idl
r76680 r76770 95 95 [notify, domain=Console] void consoleMessagesCleared(); 96 96 [domain=Console] void setMonitoringXHREnabled(in boolean enabled); 97 [notify, domain=Console] void monitoringXHRStateChanged(out boolean enabled);98 97 99 98 /////////////////////////////////////////////////////////////////////// … … 240 239 /////////////////////////////////////////////////////////////////////// 241 240 242 [domain=Inspector] void enableDebugger( in boolean always);243 [domain=Inspector] void disableDebugger( in boolean always);241 [domain=Inspector] void enableDebugger(); 242 [domain=Inspector] void disableDebugger(); 244 243 245 244 [notify, domain=Debugger] void debuggerWasEnabled(); … … 291 290 /////////////////////////////////////////////////////////////////////// 292 291 293 [domain=Inspector] void enableProfiler( in boolean always);294 [domain=Inspector] void disableProfiler( in boolean always);292 [domain=Inspector] void enableProfiler(); 293 [domain=Inspector] void disableProfiler(); 295 294 [notify, domain=Profiler] void profilerWasEnabled(); 296 295 [notify, domain=Profiler] void profilerWasDisabled(); -
trunk/Source/WebCore/inspector/InspectorAgent.cpp
r76594 r76770 73 73 #include "InspectorResourceAgent.h" 74 74 #include "InspectorRuntimeAgent.h" 75 #include "InspectorSettings.h"76 75 #include "InspectorState.h" 77 76 #include "InspectorTimelineAgent.h" … … 147 146 , m_consoleAgent(new InspectorConsoleAgent(this)) 148 147 #if ENABLE(JAVASCRIPT_DEBUGGER) 149 , m_attachDebuggerWhenShown(false)150 148 , m_profilerAgent(InspectorProfilerAgent::create(this)) 151 149 #endif … … 451 449 // remember this state to re-enable debugger on the next window 452 450 // opening. 453 bool debuggerWasEnabled = debuggerEnabled();454 451 disableDebugger(); 455 m_attachDebuggerWhenShown = debuggerWasEnabled;456 452 #endif 457 453 setSearchingForNode(false); … … 571 567 ASSERT(m_frontend); 572 568 #if ENABLE(JAVASCRIPT_DEBUGGER) 573 if (InspectorDebuggerAgent::isDebuggerAlwaysEnabled() || m_attachDebuggerWhenShown || m_settings->getBoolean(InspectorSettings::DebuggerAlwaysEnabled)) { 574 enableDebugger(false); 575 m_attachDebuggerWhenShown = false; 576 } 569 if (m_state->getBoolean(InspectorState::debuggerEnabled)) 570 enableDebugger(); 577 571 #endif 578 572 } … … 583 577 #if ENABLE(JAVASCRIPT_DEBUGGER) 584 578 m_profilerAgent->setFrontend(m_frontend.get()); 585 if ( !ScriptProfiler::isProfilerAlwaysEnabled() && m_settings->getBoolean(InspectorSettings::ProfilerAlwaysEnabled))579 if (m_state->getBoolean(InspectorState::profilerEnabled)) 586 580 enableProfiler(); 587 581 if (action == ProfilerRestoreResetAgent) … … 704 698 } 705 699 } 706 }707 708 void InspectorAgent::ensureSettingsLoaded()709 {710 if (m_settings)711 return;712 m_settings = new InspectorSettings(m_client);713 m_state->setBoolean(InspectorState::monitoringXHR, m_settings->getBoolean(InspectorSettings::MonitoringXHREnabled));714 700 } 715 701 … … 993 979 } 994 980 995 void InspectorAgent::enableProfiler( bool always, bool skipRecompile)996 { 997 if ( always)998 m_settings->setBoolean(InspectorSettings::ProfilerAlwaysEnabled, true);999 m_ profilerAgent->enable(skipRecompile);1000 } 1001 1002 void InspectorAgent::disableProfiler(bool always) 1003 { 1004 if (always) 1005 m_settings->setBoolean(InspectorSettings::ProfilerAlwaysEnabled, false);981 void InspectorAgent::enableProfiler() 982 { 983 if (profilerEnabled()) 984 return; 985 m_state->setBoolean(InspectorState::profilerEnabled, true); 986 m_profilerAgent->enable(false); 987 } 988 989 void InspectorAgent::disableProfiler() 990 { 991 m_state->setBoolean(InspectorState::profilerEnabled, false); 1006 992 m_profilerAgent->disable(); 1007 993 } … … 1018 1004 1019 1005 if (!m_frontend) { 1020 m_ attachDebuggerWhenShown = true;1006 m_state->setBoolean(InspectorState::debuggerEnabled, true); 1021 1007 showPanel(ScriptsPanel); 1022 1008 } else 1023 enableDebugger(false); 1024 } 1025 1026 void InspectorAgent::enableDebugger(bool always) 1027 { 1028 ASSERT(!debuggerEnabled()); 1029 if (always) 1030 m_settings->setBoolean(InspectorSettings::DebuggerAlwaysEnabled, true); 1031 1009 enableDebugger(); 1010 } 1011 1012 void InspectorAgent::enableDebugger() 1013 { 1014 if (debuggerEnabled()) 1015 return; 1016 m_state->setBoolean(InspectorState::debuggerEnabled, true); 1032 1017 ASSERT(m_inspectedPage); 1033 1018 … … 1038 1023 } 1039 1024 1040 void InspectorAgent::disableDebugger(bool always) 1041 { 1042 if (!enabled()) 1043 return; 1044 1045 if (always) 1046 m_settings->setBoolean(InspectorSettings::DebuggerAlwaysEnabled, false); 1047 1025 void InspectorAgent::disableDebugger() 1026 { 1027 if (!enabled()) 1028 return; 1048 1029 ASSERT(m_inspectedPage); 1049 1050 1030 m_debuggerAgent.clear(); 1051 1031 m_browserDebuggerAgent.clear(); 1052 1032 1053 m_attachDebuggerWhenShown = false; 1054 1055 if (m_frontend) 1033 if (m_frontend) { 1056 1034 m_frontend->debuggerWasDisabled(); 1035 m_state->setBoolean(InspectorState::debuggerEnabled, false); 1036 } 1057 1037 } 1058 1038 -
trunk/Source/WebCore/inspector/InspectorAgent.h
r76594 r76770 75 75 class InspectorResourceAgent; 76 76 class InspectorRuntimeAgent; 77 class InspectorSettings;78 77 class InspectorState; 79 78 class InspectorStorageAgent; … … 238 237 void stopProfiling() { stopUserInitiatedProfiling(); } 239 238 void stopUserInitiatedProfiling(); 240 void enableProfiler( bool always = false, bool skipRecompile = false);241 void disableProfiler( bool always = false);239 void enableProfiler(); 240 void disableProfiler(); 242 241 bool profilerEnabled() const; 243 242 244 243 void showAndEnableDebugger(); 245 void enableDebugger( bool always);246 void disableDebugger( bool always = false);244 void enableDebugger(); 245 void disableDebugger(); 247 246 bool debuggerEnabled() const { return m_debuggerAgent; } 248 247 void resume(); … … 259 258 260 259 InspectorState* state() { return m_state.get(); } 261 InspectorSettings* settings() { return m_settings.get(); }262 260 263 261 // InspectorAgent API … … 270 268 271 269 // InspectorInstrumentation API 272 void ensureSettingsLoaded();273 270 void willSendRequest(ResourceRequest&); 274 271 … … 315 312 OwnPtr<InspectorTimelineAgent> m_timelineAgent; 316 313 OwnPtr<InspectorState> m_state; 317 OwnPtr<InspectorSettings> m_settings;318 314 319 315 #if ENABLE(OFFLINE_WEB_APPLICATIONS) … … 348 344 String m_inspectorExtensionAPI; 349 345 #if ENABLE(JAVASCRIPT_DEBUGGER) 350 bool m_attachDebuggerWhenShown;351 346 OwnPtr<InspectorDebuggerAgent> m_debuggerAgent; 352 347 OwnPtr<InspectorBrowserDebuggerAgent> m_browserDebuggerAgent; -
trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp
r76459 r76770 34 34 #include "InspectorDOMAgent.h" 35 35 #include "InspectorFrontend.h" 36 #include "InspectorSettings.h"37 36 #include "InspectorState.h" 38 37 #include "ResourceError.h" … … 195 194 { 196 195 m_inspectorAgent->state()->setBoolean(InspectorState::monitoringXHR, enabled); 197 m_inspectorAgent->settings()->setBoolean(InspectorSettings::MonitoringXHREnabled, enabled);198 if (m_frontend)199 m_frontend->monitoringXHRStateChanged(enabled);200 196 } 201 197 … … 206 202 return; 207 203 208 m_frontend->monitoringXHRStateChanged(m_inspectorAgent->state()->getBoolean(InspectorState::monitoringXHR));209 204 if (m_expiredConsoleMessageCount) 210 205 m_frontend->updateConsoleMessageExpiredCount(m_expiredConsoleMessageCount); -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r76680 r76770 67 67 } 68 68 69 bool InspectorDebuggerAgent::isDebuggerAlwaysEnabled()70 {71 return ScriptDebugServer::shared().isDebuggerAlwaysEnabled();72 }73 74 69 void InspectorDebuggerAgent::activateBreakpoints() 75 70 { -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h
r76680 r76770 61 61 virtual ~InspectorDebuggerAgent(); 62 62 63 static bool isDebuggerAlwaysEnabled();64 65 63 void setAllJavaScriptBreakpoints(PassRefPtr<InspectorObject>); 66 64 void inspectedURLChanged(const String& url); -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r76493 r76770 377 377 if (!ic->enabled()) 378 378 return; 379 ic->ensureSettingsLoaded();380 379 381 380 if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic)) … … 402 401 if (!ic->enabled()) 403 402 return; 404 ic->ensureSettingsLoaded();405 403 if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic)) 406 404 resourceAgent->didLoadResourceFromMemoryCache(loader, cachedResource); -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r76597 r76770 66 66 : m_inspectorAgent(inspectorAgent) 67 67 , m_frontend(0) 68 , m_enabled( ScriptProfiler::isProfilerAlwaysEnabled())68 , m_enabled(false) 69 69 , m_recordingUserInitiatedProfile(false) 70 70 , m_currentUserInitiatedProfileNumber(-1) … … 230 230 return; 231 231 if (!enabled()) { 232 enable( false);232 enable(true); 233 233 ScriptDebugServer::shared().recompileAllJSFunctions(); 234 234 } -
trunk/Source/WebCore/inspector/InspectorState.cpp
r76581 r76770 43 43 registerBoolean(timelineProfilerEnabled, false); 44 44 registerBoolean(searchingForNode, false); 45 registerBoolean(debuggerEnabled, false); 46 registerBoolean(profilerEnabled, false); 45 47 registerObject(javaScriptBreakpoints); 46 48 registerObject(browserBreakpoints); -
trunk/Source/WebCore/inspector/InspectorState.h
r76581 r76770 49 49 searchingForNode, 50 50 consoleMessagesEnabled, 51 profilerEnabled, 51 52 userInitiatedProfiling, 53 debuggerEnabled, 52 54 javaScriptBreakpoints, 53 55 browserBreakpoints, -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r76680 r76770 151 151 console.clearMessages(); 152 152 }, 153 154 monitoringXHRStateChanged: function(enabled)155 {156 console._monitoringXHREnabled = enabled;157 }158 153 } 159 154 InspectorBackend.registerDomainDispatcher("Console", dispatcher); … … 419 414 } 420 415 421 var itemAction = InspectorBackend.setMonitoringXHREnabled.bind(InspectorBackend, !this._monitoringXHREnabled); 416 var itemAction = function () { 417 WebInspector.settings.monitoringXHREnabled = !WebInspector.settings.monitoringXHREnabled; 418 InspectorBackend.setMonitoringXHREnabled(WebInspector.settings.monitoringXHREnabled); 419 }.bind(this); 422 420 var contextMenu = new WebInspector.ContextMenu(); 423 contextMenu.appendCheckboxItem(WebInspector.UIString("XMLHttpRequest logging"), itemAction, this._monitoringXHREnabled);421 contextMenu.appendCheckboxItem(WebInspector.UIString("XMLHttpRequest logging"), itemAction, WebInspector.settings.monitoringXHREnabled) 424 422 contextMenu.appendItem(WebInspector.UIString("Clear Console"), this.requestClearMessages.bind(this)); 425 423 contextMenu.show(event); -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r76597 r76770 581 581 _toggleProfiling: function(optionalAlways) 582 582 { 583 if (this._profilerEnabled) 583 if (this._profilerEnabled) { 584 WebInspector.settings.profilerEnabled = false; 584 585 InspectorBackend.disableProfiler(true); 585 else 586 InspectorBackend.enableProfiler(!!optionalAlways); 586 } else { 587 WebInspector.settings.profilerEnabled = !!optionalAlways; 588 InspectorBackend.enableProfiler(); 589 } 587 590 }, 588 591 -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r76681 r76770 802 802 this._stepping = false; 803 803 804 if (this._debuggerEnabled) 805 InspectorBackend.disableDebugger(true); 806 else 807 InspectorBackend.enableDebugger(!!optionalAlways); 804 if (this._debuggerEnabled) { 805 WebInspector.settings.debuggerEnabled = false; 806 InspectorBackend.disableDebugger(); 807 } else { 808 WebInspector.settings.debuggerEnabled = !!optionalAlways; 809 InspectorBackend.enableDebugger(); 810 } 808 811 }, 809 812 -
trunk/Source/WebCore/inspector/front-end/Settings.js
r76597 r76770 59 59 this.installApplicationSetting("colorFormat", "hex"); 60 60 this.installApplicationSetting("consoleHistory", []); 61 this.installApplicationSetting("debuggerEnabled", false); 62 this.installApplicationSetting("profilerEnabled", false); 61 63 this.installApplicationSetting("eventListenersFilter", "all"); 64 this.installApplicationSetting("lastActivePanel", "elements"); 62 65 this.installApplicationSetting("lastViewedScriptFile", "application"); 66 this.installApplicationSetting("monitoringXHREnabled", false); 67 this.installApplicationSetting("pauseOnExceptionState", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions); 63 68 this.installApplicationSetting("resourcesLargeRows", true); 64 69 this.installApplicationSetting("resourcesSortOptions", {timeOption: "responseTime", sizeOption: "transferSize"}); … … 67 72 this.installApplicationSetting("showUserAgentStyles", true); 68 73 this.installApplicationSetting("watchExpressions", []); 69 this.installApplicationSetting("lastActivePanel", "elements");70 this.installApplicationSetting("pauseOnExceptionState", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);71 74 72 75 this.installProjectSetting("breakpoints", {}); -
trunk/Source/WebCore/inspector/front-end/inspector.js
r76597 r76770 601 601 } 602 602 InspectorBackend.populateScriptObjects(onPopulateScriptObjects); 603 604 if (Preferences.debuggerAlwaysEnabled || WebInspector.settings.debuggerEnabled) 605 InspectorBackend.enableDebugger(); 606 if (Preferences.profilerAlwaysEnabled || WebInspector.settings.profilerEnabled) 607 InspectorBackend.enableProfiler(); 608 if (WebInspector.settings.monitoringXHREnabled) 609 InspectorBackend.setMonitoringXHREnabled(true); 603 610 604 611 InspectorBackend.setConsoleMessagesEnabled(true);
Note: See TracChangeset
for help on using the changeset viewer.