[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
yurys at chromium.org
yurys at chromium.org
Sun Feb 20 23:58:20 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit ffb351e870e4d0223f9883fd465994d623a7e2e2
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 27 09:34:33 2011 +0000
2011-01-27 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r76770.
http://trac.webkit.org/changeset/76770
https://bugs.webkit.org/show_bug.cgi?id=53229
Some inspector tests fail (Requested by yurys on #webkit).
* CMakeLists.txt:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
* bindings/js/ScriptProfiler.h:
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
* bindings/v8/ScriptDebugServer.h:
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
* bindings/v8/ScriptProfiler.h:
* inspector/Inspector.idl:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::disconnectFrontend):
(WebCore::InspectorAgent::restoreDebugger):
(WebCore::InspectorAgent::restoreProfiler):
(WebCore::InspectorAgent::ensureSettingsLoaded):
(WebCore::InspectorAgent::enableProfiler):
(WebCore::InspectorAgent::disableProfiler):
(WebCore::InspectorAgent::showAndEnableDebugger):
(WebCore::InspectorAgent::enableDebugger):
(WebCore::InspectorAgent::disableDebugger):
* inspector/InspectorAgent.h:
(WebCore::InspectorAgent::settings):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
(WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::isDebuggerAlwaysEnabled):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
* inspector/InspectorSettings.cpp: Added.
(WebCore::InspectorSettings::InspectorSettings):
(WebCore::InspectorSettings::getBoolean):
(WebCore::InspectorSettings::setBoolean):
(WebCore::InspectorSettings::getLong):
(WebCore::InspectorSettings::setLong):
(WebCore::InspectorSettings::registerBoolean):
(WebCore::InspectorSettings::registerLong):
* inspector/InspectorSettings.h: Copied from Source/WebCore/bindings/v8/ScriptProfiler.h.
* inspector/InspectorState.cpp:
(WebCore::InspectorState::InspectorState):
* inspector/InspectorState.h:
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
(WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._toggleProfiling):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._toggleDebugging):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
* inspector/front-end/inspector.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index 72639cf..93793e4 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -1173,6 +1173,7 @@ SET(WebCore_SOURCES
inspector/InspectorProfilerAgent.cpp
inspector/InspectorResourceAgent.cpp
inspector/InspectorRuntimeAgent.cpp
+ inspector/InspectorSettings.cpp
inspector/InspectorState.cpp
inspector/InspectorStyleSheet.cpp
inspector/InspectorTimelineAgent.cpp
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index cd6b0d9..0f6d07c 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,80 @@
+2011-01-27 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r76770.
+ http://trac.webkit.org/changeset/76770
+ https://bugs.webkit.org/show_bug.cgi?id=53229
+
+ Some inspector tests fail (Requested by yurys on #webkit).
+
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.exp.in:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
+ * bindings/js/ScriptDebugServer.h:
+ * bindings/js/ScriptProfiler.cpp:
+ (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
+ * bindings/js/ScriptProfiler.h:
+ * bindings/v8/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
+ * bindings/v8/ScriptDebugServer.h:
+ * bindings/v8/ScriptProfiler.cpp:
+ (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
+ * bindings/v8/ScriptProfiler.h:
+ * inspector/Inspector.idl:
+ * inspector/InspectorAgent.cpp:
+ (WebCore::InspectorAgent::InspectorAgent):
+ (WebCore::InspectorAgent::disconnectFrontend):
+ (WebCore::InspectorAgent::restoreDebugger):
+ (WebCore::InspectorAgent::restoreProfiler):
+ (WebCore::InspectorAgent::ensureSettingsLoaded):
+ (WebCore::InspectorAgent::enableProfiler):
+ (WebCore::InspectorAgent::disableProfiler):
+ (WebCore::InspectorAgent::showAndEnableDebugger):
+ (WebCore::InspectorAgent::enableDebugger):
+ (WebCore::InspectorAgent::disableDebugger):
+ * inspector/InspectorAgent.h:
+ (WebCore::InspectorAgent::settings):
+ * inspector/InspectorConsoleAgent.cpp:
+ (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
+ (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::isDebuggerAlwaysEnabled):
+ * inspector/InspectorDebuggerAgent.h:
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
+ (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
+ * inspector/InspectorProfilerAgent.cpp:
+ (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
+ (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
+ * inspector/InspectorSettings.cpp: Added.
+ (WebCore::InspectorSettings::InspectorSettings):
+ (WebCore::InspectorSettings::getBoolean):
+ (WebCore::InspectorSettings::setBoolean):
+ (WebCore::InspectorSettings::getLong):
+ (WebCore::InspectorSettings::setLong):
+ (WebCore::InspectorSettings::registerBoolean):
+ (WebCore::InspectorSettings::registerLong):
+ * inspector/InspectorSettings.h: Copied from Source/WebCore/bindings/v8/ScriptProfiler.h.
+ * inspector/InspectorState.cpp:
+ (WebCore::InspectorState::InspectorState):
+ * inspector/InspectorState.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
+ (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
+ (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype._toggleProfiling):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._toggleDebugging):
+ * inspector/front-end/Settings.js:
+ (WebInspector.Settings):
+ * inspector/front-end/inspector.js:
+
2011-01-26 Philippe Normand <pnormand at igalia.com>
Reviewed by Martin Robinson.
diff --git a/Source/WebCore/GNUmakefile.am b/Source/WebCore/GNUmakefile.am
index 84d1df6..99ea441 100644
--- a/Source/WebCore/GNUmakefile.am
+++ b/Source/WebCore/GNUmakefile.am
@@ -1994,6 +1994,8 @@ webcore_sources += \
Source/WebCore/inspector/InspectorResourceAgent.h \
Source/WebCore/inspector/InspectorRuntimeAgent.cpp \
Source/WebCore/inspector/InspectorRuntimeAgent.h \
+ Source/WebCore/inspector/InspectorSettings.cpp \
+ Source/WebCore/inspector/InspectorSettings.h \
Source/WebCore/inspector/InspectorState.cpp \
Source/WebCore/inspector/InspectorState.h \
Source/WebCore/inspector/InspectorStyleSheet.cpp \
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index 957c492..a4bdaa8 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -1368,9 +1368,9 @@ __ZN7WebCore14InspectorAgent5closeEv
__ZN7WebCore14InspectorAgent9showPanelERKN3WTF6StringE
__ZN7WebCore14InspectorAgent12ConsolePanelE
__ZN7WebCore14InspectorAgent13ProfilesPanelE
-__ZN7WebCore14InspectorAgent14enableProfilerEv
-__ZN7WebCore14InspectorAgent15disableDebuggerEv
-__ZN7WebCore14InspectorAgent15disableProfilerEv
+__ZN7WebCore14InspectorAgent14enableProfilerEbb
+__ZN7WebCore14InspectorAgent15disableDebuggerEb
+__ZN7WebCore14InspectorAgent15disableProfilerEb
__ZN7WebCore14InspectorAgent18disconnectFrontendEv
__ZN7WebCore14InspectorAgent20stopTimelineProfilerEv
__ZN7WebCore14InspectorAgent21showAndEnableDebuggerEv
diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi
index 3a96529..4a4e04c 100644
--- a/Source/WebCore/WebCore.gypi
+++ b/Source/WebCore/WebCore.gypi
@@ -2049,6 +2049,8 @@
'inspector/InspectorRuntimeAgent.cpp',
'inspector/InspectorRuntimeAgent.h',
'inspector/InspectorState.cpp',
+ 'inspector/InspectorSettings.h',
+ 'inspector/InspectorSettings.cpp',
'inspector/InspectorState.h',
'inspector/InspectorStyleSheet.cpp',
'inspector/InspectorStyleSheet.h',
diff --git a/Source/WebCore/WebCore.pro b/Source/WebCore/WebCore.pro
index aec3ecb..e64ae97 100644
--- a/Source/WebCore/WebCore.pro
+++ b/Source/WebCore/WebCore.pro
@@ -1062,6 +1062,7 @@ SOURCES += \
inspector/InspectorProfilerAgent.cpp \
inspector/InspectorResourceAgent.cpp \
inspector/InspectorRuntimeAgent.cpp \
+ inspector/InspectorSettings.cpp \
inspector/InspectorState.cpp \
inspector/InspectorStyleSheet.cpp \
inspector/InspectorTimelineAgent.cpp \
@@ -1961,6 +1962,7 @@ HEADERS += \
inspector/InspectorProfilerAgent.h \
inspector/InspectorResourceAgent.h \
inspector/InspectorRuntimeAgent.h \
+ inspector/InspectorSettings.h \
inspector/InspectorState.h \
inspector/InspectorStyleSheet.h \
inspector/InspectorTimelineAgent.h \
diff --git a/Source/WebCore/WebCore.vcproj/WebCore.vcproj b/Source/WebCore/WebCore.vcproj/WebCore.vcproj
index 74740d7..e2cefa0 100755
--- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/Source/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -65254,6 +65254,14 @@
>
</File>
<File
+ RelativePath="..\inspector\InspectorSettings.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\InspectorSettings.h"
+ >
+ </File>
+ <File
RelativePath="..\inspector\InspectorState.cpp"
>
</File>
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index d9f1105..2f221fb 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1659,6 +1659,8 @@
7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */; };
7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */; };
7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */; };
+ 7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */; };
7A674BDB0F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */; };
7A674BDC0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */; };
7A74ECBA101839A600BF939E /* InspectorDOMStorageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */; };
@@ -8101,6 +8103,8 @@
7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMAgent.h; sourceTree = "<group>"; };
7A563E5412DE32B000F4536D /* InjectedScriptSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedScriptSource.h; sourceTree = "<group>"; };
7A563F9512DF5C9100F4536D /* InjectedScriptSource.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InjectedScriptSource.js; sourceTree = "<group>"; };
+ 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorSettings.cpp; sourceTree = "<group>"; };
+ 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorSettings.h; sourceTree = "<group>"; };
7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroupLoadDeferrer.cpp; sourceTree = "<group>"; };
7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageGroupLoadDeferrer.h; sourceTree = "<group>"; };
7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMStorageAgent.cpp; sourceTree = "<group>"; };
@@ -13022,6 +13026,8 @@
82AB1772125C826700C5069D /* InspectorResourceAgent.h */,
7AA365ED12E7265400DCA242 /* InspectorRuntimeAgent.cpp */,
7AF11A5912E727490061F23C /* InspectorRuntimeAgent.h */,
+ 7A5640BD12DF9E5E00F4536D /* InspectorSettings.cpp */,
+ 7A5640BE12DF9E5E00F4536D /* InspectorSettings.h */,
4FA3B908125CD12100300BAD /* InspectorState.cpp */,
4FA3B909125CD12200300BAD /* InspectorState.h */,
82AB176F125C826700C5069D /* InspectorStyleSheet.cpp */,
@@ -20922,6 +20928,7 @@
9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */,
82AB1776125C826700C5069D /* InspectorResourceAgent.h in Headers */,
7AF11A5A12E727490061F23C /* InspectorRuntimeAgent.h in Headers */,
+ 7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */,
4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */,
82AB1774125C826700C5069D /* InspectorStyleSheet.h in Headers */,
754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */,
@@ -23665,6 +23672,7 @@
9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */,
82AB1775125C826700C5069D /* InspectorResourceAgent.cpp in Sources */,
7AA365EE12E7265400DCA242 /* InspectorRuntimeAgent.cpp in Sources */,
+ 7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */,
4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */,
82AB1773125C826700C5069D /* InspectorStyleSheet.cpp in Sources */,
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */,
diff --git a/Source/WebCore/bindings/js/ScriptDebugServer.cpp b/Source/WebCore/bindings/js/ScriptDebugServer.cpp
index 8b45f9b..33a318c 100644
--- a/Source/WebCore/bindings/js/ScriptDebugServer.cpp
+++ b/Source/WebCore/bindings/js/ScriptDebugServer.cpp
@@ -117,6 +117,11 @@ void ScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page
didRemoveListener(page);
}
+bool ScriptDebugServer::isDebuggerAlwaysEnabled()
+{
+ return false;
+}
+
bool ScriptDebugServer::hasListenersInterestedInPage(Page* page)
{
ASSERT_ARG(page, page);
diff --git a/Source/WebCore/bindings/js/ScriptDebugServer.h b/Source/WebCore/bindings/js/ScriptDebugServer.h
index 368b07b..1e38819 100644
--- a/Source/WebCore/bindings/js/ScriptDebugServer.h
+++ b/Source/WebCore/bindings/js/ScriptDebugServer.h
@@ -93,6 +93,8 @@ public:
JavaScriptCallFrame* currentCallFrame();
+ bool isDebuggerAlwaysEnabled();
+
private:
typedef HashSet<ScriptDebugListener*> ListenerSet;
typedef void (ScriptDebugServer::*JavaScriptExecutionCallback)(ScriptDebugListener*);
diff --git a/Source/WebCore/bindings/js/ScriptProfiler.cpp b/Source/WebCore/bindings/js/ScriptProfiler.cpp
index f372c3c..62ae9ba 100644
--- a/Source/WebCore/bindings/js/ScriptProfiler.cpp
+++ b/Source/WebCore/bindings/js/ScriptProfiler.cpp
@@ -46,6 +46,11 @@ PassRefPtr<ScriptProfile> ScriptProfiler::stop(ScriptState* state, const String&
return ScriptProfile::create(profile);
}
+bool ScriptProfiler::isProfilerAlwaysEnabled()
+{
+ return false;
+}
+
} // namespace WebCore
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
diff --git a/Source/WebCore/bindings/js/ScriptProfiler.h b/Source/WebCore/bindings/js/ScriptProfiler.h
index d8ad482..4c0c07f 100644
--- a/Source/WebCore/bindings/js/ScriptProfiler.h
+++ b/Source/WebCore/bindings/js/ScriptProfiler.h
@@ -50,6 +50,7 @@ public:
static void start(ScriptState* state, const String& title);
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&, HeapSnapshotProgress*) { return 0; }
+ static bool isProfilerAlwaysEnabled();
};
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/ScriptDebugServer.cpp b/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
index 11fa860..97c57f4 100644
--- a/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
+++ b/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
@@ -342,6 +342,11 @@ void ScriptDebugServer::setEnabled(bool value)
m_enabled = value;
}
+bool ScriptDebugServer::isDebuggerAlwaysEnabled()
+{
+ return m_enabled;
+}
+
void ScriptDebugServer::interruptAndRun(PassOwnPtr<Task> task)
{
v8::Debug::DebugBreakForCommand(new ClientDataImpl(task));
diff --git a/Source/WebCore/bindings/v8/ScriptDebugServer.h b/Source/WebCore/bindings/v8/ScriptDebugServer.h
index b4e7390..953ddc3 100644
--- a/Source/WebCore/bindings/v8/ScriptDebugServer.h
+++ b/Source/WebCore/bindings/v8/ScriptDebugServer.h
@@ -99,6 +99,7 @@ public:
PassRefPtr<JavaScriptCallFrame> currentCallFrame();
void setEnabled(bool);
+ bool isDebuggerAlwaysEnabled();
class Task {
public:
diff --git a/Source/WebCore/bindings/v8/ScriptProfiler.cpp b/Source/WebCore/bindings/v8/ScriptProfiler.cpp
index 615dcfc..5de1b36 100644
--- a/Source/WebCore/bindings/v8/ScriptProfiler.cpp
+++ b/Source/WebCore/bindings/v8/ScriptProfiler.cpp
@@ -90,4 +90,9 @@ PassRefPtr<ScriptHeapSnapshot> ScriptProfiler::takeHeapSnapshot(const String& ti
return snapshot ? ScriptHeapSnapshot::create(snapshot) : 0;
}
+bool ScriptProfiler::isProfilerAlwaysEnabled()
+{
+ return true;
+}
+
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/ScriptProfiler.h b/Source/WebCore/bindings/v8/ScriptProfiler.h
index 9016668..83aab7b 100644
--- a/Source/WebCore/bindings/v8/ScriptProfiler.h
+++ b/Source/WebCore/bindings/v8/ScriptProfiler.h
@@ -56,6 +56,7 @@ public:
static void start(ScriptState* state, const String& title);
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*);
+ static bool isProfilerAlwaysEnabled();
};
} // namespace WebCore
diff --git a/Source/WebCore/inspector/Inspector.idl b/Source/WebCore/inspector/Inspector.idl
index 9797274..b8ccd8e 100644
--- a/Source/WebCore/inspector/Inspector.idl
+++ b/Source/WebCore/inspector/Inspector.idl
@@ -94,6 +94,7 @@ module core {
[domain=Console] void clearConsoleMessages();
[notify, domain=Console] void consoleMessagesCleared();
[domain=Console] void setMonitoringXHREnabled(in boolean enabled);
+ [notify, domain=Console] void monitoringXHRStateChanged(out boolean enabled);
///////////////////////////////////////////////////////////////////////
// Network API
@@ -238,8 +239,8 @@ module core {
// Debugger API
///////////////////////////////////////////////////////////////////////
- [domain=Inspector] void enableDebugger();
- [domain=Inspector] void disableDebugger();
+ [domain=Inspector] void enableDebugger(in boolean always);
+ [domain=Inspector] void disableDebugger(in boolean always);
[notify, domain=Debugger] void debuggerWasEnabled();
[notify, domain=Debugger] void debuggerWasDisabled();
@@ -289,8 +290,8 @@ module core {
// Profiler API
///////////////////////////////////////////////////////////////////////
- [domain=Inspector] void enableProfiler();
- [domain=Inspector] void disableProfiler();
+ [domain=Inspector] void enableProfiler(in boolean always);
+ [domain=Inspector] void disableProfiler(in boolean always);
[notify, domain=Profiler] void profilerWasEnabled();
[notify, domain=Profiler] void profilerWasDisabled();
diff --git a/Source/WebCore/inspector/InspectorAgent.cpp b/Source/WebCore/inspector/InspectorAgent.cpp
index 7640668..4b342c7 100644
--- a/Source/WebCore/inspector/InspectorAgent.cpp
+++ b/Source/WebCore/inspector/InspectorAgent.cpp
@@ -72,6 +72,7 @@
#include "InspectorProfilerAgent.h"
#include "InspectorResourceAgent.h"
#include "InspectorRuntimeAgent.h"
+#include "InspectorSettings.h"
#include "InspectorState.h"
#include "InspectorTimelineAgent.h"
#include "InspectorValues.h"
@@ -145,6 +146,7 @@ InspectorAgent::InspectorAgent(InspectorController* inspectorController, Page* p
, m_injectedScriptHost(InjectedScriptHost::create(this))
, m_consoleAgent(new InspectorConsoleAgent(this))
#if ENABLE(JAVASCRIPT_DEBUGGER)
+ , m_attachDebuggerWhenShown(false)
, m_profilerAgent(InspectorProfilerAgent::create(this))
#endif
{
@@ -448,7 +450,9 @@ void InspectorAgent::disconnectFrontend()
// If the window is being closed with the debugger enabled,
// remember this state to re-enable debugger on the next window
// opening.
+ bool debuggerWasEnabled = debuggerEnabled();
disableDebugger();
+ m_attachDebuggerWhenShown = debuggerWasEnabled;
#endif
setSearchingForNode(false);
unbindAllResources();
@@ -566,8 +570,10 @@ void InspectorAgent::restoreDebugger()
{
ASSERT(m_frontend);
#if ENABLE(JAVASCRIPT_DEBUGGER)
- if (m_state->getBoolean(InspectorState::debuggerEnabled))
- enableDebugger();
+ if (InspectorDebuggerAgent::isDebuggerAlwaysEnabled() || m_attachDebuggerWhenShown || m_settings->getBoolean(InspectorSettings::DebuggerAlwaysEnabled)) {
+ enableDebugger(false);
+ m_attachDebuggerWhenShown = false;
+ }
#endif
}
@@ -576,7 +582,7 @@ void InspectorAgent::restoreProfiler(ProfilerRestoreAction action)
ASSERT(m_frontend);
#if ENABLE(JAVASCRIPT_DEBUGGER)
m_profilerAgent->setFrontend(m_frontend.get());
- if (m_state->getBoolean(InspectorState::profilerEnabled))
+ if (!ScriptProfiler::isProfilerAlwaysEnabled() && m_settings->getBoolean(InspectorSettings::ProfilerAlwaysEnabled))
enableProfiler();
if (action == ProfilerRestoreResetAgent)
m_profilerAgent->resetFrontendProfiles();
@@ -699,6 +705,14 @@ void InspectorAgent::willSendRequest(ResourceRequest& request)
}
}
+void InspectorAgent::ensureSettingsLoaded()
+{
+ if (m_settings)
+ return;
+ m_settings = new InspectorSettings(m_client);
+ m_state->setBoolean(InspectorState::monitoringXHR, m_settings->getBoolean(InspectorSettings::MonitoringXHREnabled));
+}
+
void InspectorAgent::startTimelineProfiler()
{
if (!enabled())
@@ -978,17 +992,17 @@ bool InspectorAgent::profilerEnabled() const
return enabled() && m_profilerAgent->enabled();
}
-void InspectorAgent::enableProfiler()
+void InspectorAgent::enableProfiler(bool always, bool skipRecompile)
{
- if (profilerEnabled())
- return;
- m_state->setBoolean(InspectorState::profilerEnabled, true);
- m_profilerAgent->enable(false);
+ if (always)
+ m_settings->setBoolean(InspectorSettings::ProfilerAlwaysEnabled, true);
+ m_profilerAgent->enable(skipRecompile);
}
-void InspectorAgent::disableProfiler()
+void InspectorAgent::disableProfiler(bool always)
{
- m_state->setBoolean(InspectorState::profilerEnabled, false);
+ if (always)
+ m_settings->setBoolean(InspectorSettings::ProfilerAlwaysEnabled, false);
m_profilerAgent->disable();
}
#endif
@@ -1003,17 +1017,18 @@ void InspectorAgent::showAndEnableDebugger()
return;
if (!m_frontend) {
- m_state->setBoolean(InspectorState::debuggerEnabled, true);
+ m_attachDebuggerWhenShown = true;
showPanel(ScriptsPanel);
} else
- enableDebugger();
+ enableDebugger(false);
}
-void InspectorAgent::enableDebugger()
+void InspectorAgent::enableDebugger(bool always)
{
- if (debuggerEnabled())
- return;
- m_state->setBoolean(InspectorState::debuggerEnabled, true);
+ ASSERT(!debuggerEnabled());
+ if (always)
+ m_settings->setBoolean(InspectorSettings::DebuggerAlwaysEnabled, true);
+
ASSERT(m_inspectedPage);
m_debuggerAgent = InspectorDebuggerAgent::create(this, m_frontend.get());
@@ -1022,18 +1037,23 @@ void InspectorAgent::enableDebugger()
m_frontend->debuggerWasEnabled();
}
-void InspectorAgent::disableDebugger()
+void InspectorAgent::disableDebugger(bool always)
{
if (!enabled())
return;
+
+ if (always)
+ m_settings->setBoolean(InspectorSettings::DebuggerAlwaysEnabled, false);
+
ASSERT(m_inspectedPage);
+
m_debuggerAgent.clear();
m_browserDebuggerAgent.clear();
- if (m_frontend) {
+ m_attachDebuggerWhenShown = false;
+
+ if (m_frontend)
m_frontend->debuggerWasDisabled();
- m_state->setBoolean(InspectorState::debuggerEnabled, false);
- }
}
void InspectorAgent::resume()
diff --git a/Source/WebCore/inspector/InspectorAgent.h b/Source/WebCore/inspector/InspectorAgent.h
index 8cc49a6..362abec 100644
--- a/Source/WebCore/inspector/InspectorAgent.h
+++ b/Source/WebCore/inspector/InspectorAgent.h
@@ -74,6 +74,7 @@ class InspectorObject;
class InspectorProfilerAgent;
class InspectorResourceAgent;
class InspectorRuntimeAgent;
+class InspectorSettings;
class InspectorState;
class InspectorStorageAgent;
class InspectorTimelineAgent;
@@ -236,13 +237,13 @@ public:
void startUserInitiatedProfiling();
void stopProfiling() { stopUserInitiatedProfiling(); }
void stopUserInitiatedProfiling();
- void enableProfiler();
- void disableProfiler();
+ void enableProfiler(bool always = false, bool skipRecompile = false);
+ void disableProfiler(bool always = false);
bool profilerEnabled() const;
void showAndEnableDebugger();
- void enableDebugger();
- void disableDebugger();
+ void enableDebugger(bool always);
+ void disableDebugger(bool always = false);
bool debuggerEnabled() const { return m_debuggerAgent; }
void resume();
@@ -257,6 +258,7 @@ public:
void setInspectorExtensionAPI(const String& source);
InspectorState* state() { return m_state.get(); }
+ InspectorSettings* settings() { return m_settings.get(); }
// InspectorAgent API
void getInspectorState(RefPtr<InspectorObject>* state);
@@ -267,6 +269,7 @@ public:
void didEvaluateForTestInFrontend(long callId, const String& jsonResult);
// InspectorInstrumentation API
+ void ensureSettingsLoaded();
void willSendRequest(ResourceRequest&);
private:
@@ -311,6 +314,7 @@ private:
OwnPtr<InspectorTimelineAgent> m_timelineAgent;
OwnPtr<InspectorState> m_state;
+ OwnPtr<InspectorSettings> m_settings;
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
OwnPtr<InspectorApplicationCacheAgent> m_applicationCacheAgent;
@@ -343,6 +347,7 @@ private:
Vector<String> m_scriptsToEvaluateOnLoad;
String m_inspectorExtensionAPI;
#if ENABLE(JAVASCRIPT_DEBUGGER)
+ bool m_attachDebuggerWhenShown;
OwnPtr<InspectorDebuggerAgent> m_debuggerAgent;
OwnPtr<InspectorBrowserDebuggerAgent> m_browserDebuggerAgent;
OwnPtr<InspectorProfilerAgent> m_profilerAgent;
diff --git a/Source/WebCore/inspector/InspectorConsoleAgent.cpp b/Source/WebCore/inspector/InspectorConsoleAgent.cpp
index 872cbb7..76638c7 100644
--- a/Source/WebCore/inspector/InspectorConsoleAgent.cpp
+++ b/Source/WebCore/inspector/InspectorConsoleAgent.cpp
@@ -33,6 +33,7 @@
#include "InspectorAgent.h"
#include "InspectorDOMAgent.h"
#include "InspectorFrontend.h"
+#include "InspectorSettings.h"
#include "InspectorState.h"
#include "ResourceError.h"
#include "ResourceResponse.h"
@@ -193,6 +194,9 @@ void InspectorConsoleAgent::didFailLoading(unsigned long identifier, const Resou
void InspectorConsoleAgent::setMonitoringXHREnabled(bool enabled)
{
m_inspectorAgent->state()->setBoolean(InspectorState::monitoringXHR, enabled);
+ m_inspectorAgent->settings()->setBoolean(InspectorSettings::MonitoringXHREnabled, enabled);
+ if (m_frontend)
+ m_frontend->monitoringXHRStateChanged(enabled);
}
void InspectorConsoleAgent::setConsoleMessagesEnabled(bool enabled)
@@ -201,6 +205,7 @@ void InspectorConsoleAgent::setConsoleMessagesEnabled(bool enabled)
if (!enabled || !m_frontend)
return;
+ m_frontend->monitoringXHRStateChanged(m_inspectorAgent->state()->getBoolean(InspectorState::monitoringXHR));
if (m_expiredConsoleMessageCount)
m_frontend->updateConsoleMessageExpiredCount(m_expiredConsoleMessageCount);
unsigned messageCount = m_consoleMessages.size();
diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
index 3c62981..9f3cce8 100644
--- a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
@@ -66,6 +66,11 @@ InspectorDebuggerAgent::~InspectorDebuggerAgent()
m_pausedScriptState = 0;
}
+bool InspectorDebuggerAgent::isDebuggerAlwaysEnabled()
+{
+ return ScriptDebugServer::shared().isDebuggerAlwaysEnabled();
+}
+
void InspectorDebuggerAgent::activateBreakpoints()
{
ScriptDebugServer::shared().activateBreakpoints();
diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.h b/Source/WebCore/inspector/InspectorDebuggerAgent.h
index f0de973..34ad0db 100644
--- a/Source/WebCore/inspector/InspectorDebuggerAgent.h
+++ b/Source/WebCore/inspector/InspectorDebuggerAgent.h
@@ -60,6 +60,8 @@ public:
static PassOwnPtr<InspectorDebuggerAgent> create(InspectorAgent*, InspectorFrontend*);
virtual ~InspectorDebuggerAgent();
+ static bool isDebuggerAlwaysEnabled();
+
void setAllJavaScriptBreakpoints(PassRefPtr<InspectorObject>);
void inspectedURLChanged(const String& url);
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
index dbb472a..c449ba4 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -376,6 +376,7 @@ void InspectorInstrumentation::identifierForInitialRequestImpl(InspectorAgent* i
{
if (!ic->enabled())
return;
+ ic->ensureSettingsLoaded();
if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic))
resourceAgent->identifierForInitialRequest(identifier, request.url(), loader);
@@ -400,6 +401,7 @@ void InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl(InspectorAgent
{
if (!ic->enabled())
return;
+ ic->ensureSettingsLoaded();
if (InspectorResourceAgent* resourceAgent = retrieveResourceAgent(ic))
resourceAgent->didLoadResourceFromMemoryCache(loader, cachedResource);
}
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.cpp b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
index 47dc585..4693050 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -65,7 +65,7 @@ PassOwnPtr<InspectorProfilerAgent> InspectorProfilerAgent::create(InspectorAgent
InspectorProfilerAgent::InspectorProfilerAgent(InspectorAgent* inspectorAgent)
: m_inspectorAgent(inspectorAgent)
, m_frontend(0)
- , m_enabled(false)
+ , m_enabled(ScriptProfiler::isProfilerAlwaysEnabled())
, m_recordingUserInitiatedProfile(false)
, m_currentUserInitiatedProfileNumber(-1)
, m_nextUserInitiatedProfileNumber(1)
@@ -229,7 +229,7 @@ void InspectorProfilerAgent::startUserInitiatedProfiling()
if (m_recordingUserInitiatedProfile)
return;
if (!enabled()) {
- enable(true);
+ enable(false);
ScriptDebugServer::shared().recompileAllJSFunctions();
}
m_recordingUserInitiatedProfile = true;
diff --git a/Source/WebCore/inspector/InspectorSettings.cpp b/Source/WebCore/inspector/InspectorSettings.cpp
new file mode 100644
index 0000000..08c5645
--- /dev/null
+++ b/Source/WebCore/inspector/InspectorSettings.cpp
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h"
+#include "InspectorSettings.h"
+
+#if ENABLE(INSPECTOR)
+
+#include "InspectorClient.h"
+
+namespace WebCore {
+
+const char* InspectorSettings::MonitoringXHREnabled = "xhrMonitor";
+const char* InspectorSettings::ProfilerAlwaysEnabled = "profilerEnabled";
+const char* InspectorSettings::DebuggerAlwaysEnabled = "debuggerEnabled";
+
+InspectorSettings::InspectorSettings(InspectorClient* client)
+ : m_client(client)
+{
+ registerBoolean(MonitoringXHREnabled, false);
+ registerBoolean(ProfilerAlwaysEnabled, false);
+ registerBoolean(DebuggerAlwaysEnabled, false);
+}
+
+bool InspectorSettings::getBoolean(const String& name)
+{
+ String value;
+ m_client->populateSetting(name, &value);
+ if (value.isEmpty())
+ value = m_defaultValues.get(name);
+ return value == "true";
+}
+
+void InspectorSettings::setBoolean(const String& name, bool value)
+{
+ m_client->storeSetting(name, value ? "true" : "false");
+}
+
+long InspectorSettings::getLong(const String& name)
+{
+ String value;
+ m_client->populateSetting(name, &value);
+ if (value.isEmpty())
+ value = m_defaultValues.get(name);
+ return value.toInt();
+}
+
+void InspectorSettings::setLong(const String& name, long value)
+{
+ m_client->storeSetting(name, String::number(value));
+}
+
+void InspectorSettings::registerBoolean(const String& name, bool defaultValue)
+{
+ m_defaultValues.set(name, defaultValue ? "true" : "false");
+}
+
+void InspectorSettings::registerLong(const String& name, long defaultValue)
+{
+ m_defaultValues.set(name, String::number(defaultValue));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorSettings.h b/Source/WebCore/inspector/InspectorSettings.h
new file mode 100644
index 0000000..0d48570
--- /dev/null
+++ b/Source/WebCore/inspector/InspectorSettings.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InspectorSettings_h
+#define InspectorSettings_h
+
+#if ENABLE(INSPECTOR)
+
+#include "PlatformString.h"
+
+#include <wtf/HashMap.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebCore {
+
+class InspectorClient;
+
+class InspectorSettings {
+public:
+ static const char* MonitoringXHREnabled;
+ static const char* ProfilerAlwaysEnabled;
+ static const char* DebuggerAlwaysEnabled;
+
+ InspectorSettings(InspectorClient* client);
+
+ bool getBoolean(const String& name);
+ void setBoolean(const String& name, bool value);
+
+ long getLong(const String& name);
+ void setLong(const String& name, long value);
+
+private:
+ void registerBoolean(const String& name, bool defaultValue);
+ void registerLong(const String& name, long defaultValue);
+
+ typedef HashMap<String, String> Dictionary;
+ Dictionary m_defaultValues;
+ InspectorClient* m_client;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR)
+#endif // !defined(InspectorSettings_h)
diff --git a/Source/WebCore/inspector/InspectorState.cpp b/Source/WebCore/inspector/InspectorState.cpp
index 779d464..c1b6821 100644
--- a/Source/WebCore/inspector/InspectorState.cpp
+++ b/Source/WebCore/inspector/InspectorState.cpp
@@ -42,8 +42,6 @@ InspectorState::InspectorState(InspectorClient* client)
registerBoolean(userInitiatedProfiling, false);
registerBoolean(timelineProfilerEnabled, false);
registerBoolean(searchingForNode, false);
- registerBoolean(debuggerEnabled, false);
- registerBoolean(profilerEnabled, false);
registerObject(javaScriptBreakpoints);
registerObject(browserBreakpoints);
registerBoolean(consoleMessagesEnabled, false);
diff --git a/Source/WebCore/inspector/InspectorState.h b/Source/WebCore/inspector/InspectorState.h
index 90a2c17..2017332 100644
--- a/Source/WebCore/inspector/InspectorState.h
+++ b/Source/WebCore/inspector/InspectorState.h
@@ -48,9 +48,7 @@ public:
timelineProfilerEnabled,
searchingForNode,
consoleMessagesEnabled,
- profilerEnabled,
userInitiatedProfiling,
- debuggerEnabled,
javaScriptBreakpoints,
browserBreakpoints,
resourceAgentEnabled,
diff --git a/Source/WebCore/inspector/front-end/ConsoleView.js b/Source/WebCore/inspector/front-end/ConsoleView.js
index 3aa5ef0..7feb7ab 100644
--- a/Source/WebCore/inspector/front-end/ConsoleView.js
+++ b/Source/WebCore/inspector/front-end/ConsoleView.js
@@ -150,6 +150,11 @@ WebInspector.ConsoleView.prototype = {
{
console.clearMessages();
},
+
+ monitoringXHRStateChanged: function(enabled)
+ {
+ console._monitoringXHREnabled = enabled;
+ }
}
InspectorBackend.registerDomainDispatcher("Console", dispatcher);
},
@@ -413,12 +418,9 @@ WebInspector.ConsoleView.prototype = {
return;
}
- var itemAction = function () {
- WebInspector.settings.monitoringXHREnabled = !WebInspector.settings.monitoringXHREnabled;
- InspectorBackend.setMonitoringXHREnabled(WebInspector.settings.monitoringXHREnabled);
- }.bind(this);
+ var itemAction = InspectorBackend.setMonitoringXHREnabled.bind(InspectorBackend, !this._monitoringXHREnabled);
var contextMenu = new WebInspector.ContextMenu();
- contextMenu.appendCheckboxItem(WebInspector.UIString("XMLHttpRequest logging"), itemAction, WebInspector.settings.monitoringXHREnabled)
+ contextMenu.appendCheckboxItem(WebInspector.UIString("XMLHttpRequest logging"), itemAction, this._monitoringXHREnabled);
contextMenu.appendItem(WebInspector.UIString("Clear Console"), this.requestClearMessages.bind(this));
contextMenu.show(event);
},
diff --git a/Source/WebCore/inspector/front-end/ProfilesPanel.js b/Source/WebCore/inspector/front-end/ProfilesPanel.js
index 176ddb2..bbe0c5e 100644
--- a/Source/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/Source/WebCore/inspector/front-end/ProfilesPanel.js
@@ -580,13 +580,10 @@ WebInspector.ProfilesPanel.prototype = {
_toggleProfiling: function(optionalAlways)
{
- if (this._profilerEnabled) {
- WebInspector.settings.profilerEnabled = false;
+ if (this._profilerEnabled)
InspectorBackend.disableProfiler(true);
- } else {
- WebInspector.settings.profilerEnabled = !!optionalAlways;
- InspectorBackend.enableProfiler();
- }
+ else
+ InspectorBackend.enableProfiler(!!optionalAlways);
},
_populateProfiles: function()
diff --git a/Source/WebCore/inspector/front-end/ScriptsPanel.js b/Source/WebCore/inspector/front-end/ScriptsPanel.js
index ddc906a..88be663 100644
--- a/Source/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/Source/WebCore/inspector/front-end/ScriptsPanel.js
@@ -801,13 +801,10 @@ WebInspector.ScriptsPanel.prototype = {
this._waitingToPause = false;
this._stepping = false;
- if (this._debuggerEnabled) {
- WebInspector.settings.debuggerEnabled = false;
- InspectorBackend.disableDebugger();
- } else {
- WebInspector.settings.debuggerEnabled = !!optionalAlways;
- InspectorBackend.enableDebugger();
- }
+ if (this._debuggerEnabled)
+ InspectorBackend.disableDebugger(true);
+ else
+ InspectorBackend.enableDebugger(!!optionalAlways);
},
_togglePauseOnExceptions: function()
diff --git a/Source/WebCore/inspector/front-end/Settings.js b/Source/WebCore/inspector/front-end/Settings.js
index 1cea5e1..ef6b263 100644
--- a/Source/WebCore/inspector/front-end/Settings.js
+++ b/Source/WebCore/inspector/front-end/Settings.js
@@ -58,19 +58,16 @@ WebInspector.Settings = function()
{
this.installApplicationSetting("colorFormat", "hex");
this.installApplicationSetting("consoleHistory", []);
- this.installApplicationSetting("debuggerEnabled", false);
- this.installApplicationSetting("profilerEnabled", false);
this.installApplicationSetting("eventListenersFilter", "all");
- this.installApplicationSetting("lastActivePanel", "elements");
this.installApplicationSetting("lastViewedScriptFile", "application");
- this.installApplicationSetting("monitoringXHREnabled", false);
- this.installApplicationSetting("pauseOnExceptionState", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
this.installApplicationSetting("resourcesLargeRows", true);
this.installApplicationSetting("resourcesSortOptions", {timeOption: "responseTime", sizeOption: "transferSize"});
this.installApplicationSetting("resourceViewTab", "content");
this.installApplicationSetting("showInheritedComputedStyleProperties", false);
this.installApplicationSetting("showUserAgentStyles", true);
this.installApplicationSetting("watchExpressions", []);
+ this.installApplicationSetting("lastActivePanel", "elements");
+ this.installApplicationSetting("pauseOnExceptionState", WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
this.installProjectSetting("breakpoints", {});
this.installProjectSetting("nativeBreakpoints", []);
diff --git a/Source/WebCore/inspector/front-end/inspector.js b/Source/WebCore/inspector/front-end/inspector.js
index c821568..0fa4209 100644
--- a/Source/WebCore/inspector/front-end/inspector.js
+++ b/Source/WebCore/inspector/front-end/inspector.js
@@ -601,13 +601,6 @@ WebInspector.doLoadedDone = function()
}
InspectorBackend.populateScriptObjects(onPopulateScriptObjects);
- if (Preferences.debuggerAlwaysEnabled || WebInspector.settings.debuggerEnabled)
- InspectorBackend.enableDebugger();
- if (Preferences.profilerAlwaysEnabled || WebInspector.settings.profilerEnabled)
- InspectorBackend.enableProfiler();
- if (WebInspector.settings.monitoringXHREnabled)
- InspectorBackend.setMonitoringXHREnabled(true);
-
InspectorBackend.setConsoleMessagesEnabled(true);
function propertyNamesCallback(names)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list