[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mnaganov at chromium.org
mnaganov at chromium.org
Wed Dec 22 12:25:20 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 00743c3fb52ae38ffceb7637b411589361714381
Author: mnaganov at chromium.org <mnaganov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 23 09:35:21 2010 +0000
2010-08-23 Mikhail Naganov <mnaganov at chromium.org>
Reviewed by Pavel Feldman.
Extract profiler-related code and data from InspectorController into
InspectorProfilerAgent.
https://bugs.webkit.org/show_bug.cgi?id=44174
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index eb42c5c..209f6b3 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1075,6 +1075,7 @@ SET(WebCore_SOURCES
inspector/InspectorDebuggerAgent.cpp
inspector/InspectorFrontendClientLocal.cpp
inspector/InspectorFrontendHost.cpp
+ inspector/InspectorProfilerAgent.cpp
inspector/InspectorResource.cpp
inspector/InspectorValues.cpp
inspector/InspectorStorageAgent.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e3ec39d..d3c9216 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,71 @@
+2010-08-23 Mikhail Naganov <mnaganov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Extract profiler-related code and data from InspectorController into
+ InspectorProfilerAgent.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44174
+
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.exp.in:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptProfiler.cpp:
+ (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
+ * bindings/js/ScriptProfiler.h:
+ * bindings/v8/ScriptProfiler.cpp:
+ (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
+ * bindings/v8/ScriptProfiler.h:
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::connectFrontend):
+ (WebCore::InspectorController::disconnectFrontend):
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::didCommitLoad):
+ (WebCore::InspectorController::addProfile):
+ (WebCore::InspectorController::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorController::addStartProfilingMessageToConsole):
+ (WebCore::InspectorController::isRecordingUserInitiatedProfile):
+ (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
+ (WebCore::InspectorController::startUserInitiatedProfiling):
+ (WebCore::InspectorController::stopUserInitiatedProfiling):
+ (WebCore::InspectorController::profilerEnabled):
+ (WebCore::InspectorController::enableProfiler):
+ (WebCore::InspectorController::disableProfiler):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::profilerAgent):
+ * inspector/InspectorProfilerAgent.cpp: Added.
+ (WebCore::InspectorProfilerAgent::create):
+ (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
+ (WebCore::InspectorProfilerAgent::~InspectorProfilerAgent):
+ (WebCore::InspectorProfilerAgent::addProfile):
+ (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
+ (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
+ (WebCore::InspectorProfilerAgent::createProfileHeader):
+ (WebCore::InspectorProfilerAgent::disable):
+ (WebCore::InspectorProfilerAgent::enable):
+ (WebCore::InspectorProfilerAgent::getCurrentUserInitiatedProfileName):
+ (WebCore::InspectorProfilerAgent::getProfileHeaders):
+ (WebCore::InspectorProfilerAgent::getProfile):
+ (WebCore::InspectorProfilerAgent::removeProfile):
+ (WebCore::InspectorProfilerAgent::resetState):
+ (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
+ (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling):
+ (WebCore::InspectorProfilerAgent::toggleRecordButton):
+ * inspector/InspectorProfilerAgent.h: Added.
+ (WebCore::InspectorProfilerAgent::clearProfiles):
+ (WebCore::InspectorProfilerAgent::enabled):
+ (WebCore::InspectorProfilerAgent::isRecordingUserInitiatedProfile):
+ (WebCore::InspectorProfilerAgent::setRemoteFrontend):
+ (WebCore::InspectorProfilerAgent::startProfiling):
+ (WebCore::InspectorProfilerAgent::stopProfiling):
+
2010-08-23 Ariya Hidayat <ariya at sencha.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index f1ec445..84c6ff0 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1628,6 +1628,8 @@ webcore_sources += \
WebCore/inspector/InspectorFrontendClientLocal.h \
WebCore/inspector/InspectorFrontendHost.cpp \
WebCore/inspector/InspectorFrontendHost.h \
+ WebCore/inspector/InspectorProfilerAgent.cpp \
+ WebCore/inspector/InspectorProfilerAgent.h \
WebCore/inspector/InspectorResource.cpp \
WebCore/inspector/InspectorResource.h \
WebCore/inspector/InspectorStorageAgent.cpp \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 249c3f7..eacf471 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -1189,10 +1189,12 @@ __ZN7WebCore19InspectorController20stopTimelineProfilerEv
__ZN7WebCore19InspectorController21startTimelineProfilerEv
__ZN7WebCore19InspectorController25evaluateForTestInFrontendElRKN3WTF6StringE
__ZN7WebCore19InspectorController26setInspectorFrontendClientEN3WTF10PassOwnPtrINS_23InspectorFrontendClientEEE
+__ZN7WebCore19InspectorController27startUserInitiatedProfilingEv
__ZN7WebCore19InspectorController26stopUserInitiatedProfilingEv
-__ZN7WebCore19InspectorController27startUserInitiatedProfilingEPNS_5TimerIS0_EE
__ZN7WebCore19InspectorController34inspectorStartsAttachedSettingNameEv
__ZN7WebCore19InspectorController34inspectorStartsAttachedSettingNameEv
+__ZNK7WebCore19InspectorController31isRecordingUserInitiatedProfileEv
+__ZNK7WebCore19InspectorController15profilerEnabledEv
__ZN7WebCore19InspectorController4showEv
__ZN7WebCore19InspectorController5closeEv
__ZN7WebCore19InspectorController7inspectEPNS_4NodeE
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index f4738a5..8ad450f 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1770,6 +1770,8 @@
'inspector/InspectorFrontendClient.h',
'inspector/InspectorFrontendHost.cpp',
'inspector/InspectorFrontendHost.h',
+ 'inspector/InspectorProfilerAgent.cpp',
+ 'inspector/InspectorProfilerAgent.h',
'inspector/InspectorResource.cpp',
'inspector/InspectorResource.h',
'inspector/InspectorStorageAgent.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 13aa073..80348dc 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -762,6 +762,7 @@ SOURCES += \
inspector/InspectorDOMStorageResource.cpp \
inspector/InspectorFrontendClientLocal.cpp \
inspector/InspectorFrontendHost.cpp \
+ inspector/InspectorProfilerAgent.cpp \
inspector/InspectorResource.cpp \
inspector/InspectorStorageAgent.cpp \
inspector/InspectorTimelineAgent.cpp \
@@ -1532,6 +1533,7 @@ HEADERS += \
inspector/InspectorFrontendClient.h \
inspector/InspectorFrontendClientLocal.h \
inspector/InspectorFrontendHost.h \
+ inspector/InspectorProfilerAgent.h \
inspector/InspectorResource.h \
inspector/InspectorStorageAgent.h \
inspector/InspectorTimelineAgent.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 7486033..3ea4b5f 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -51873,6 +51873,14 @@
>
</File>
<File
+ RelativePath="..\inspector\InspectorProfilerAgent.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\InspectorProfilerAgent.h"
+ >
+ </File>
+ <File
RelativePath="..\inspector\InspectorResource.cpp"
>
</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 8059aa2..5df4943 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2745,6 +2745,8 @@
97EF561011E40783007E026F /* HTMLConstructionSite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */; };
97EF561111E40783007E026F /* HTMLConstructionSite.h in Headers */ = {isa = PBXBuildFile; fileRef = 97EF560F11E40783007E026F /* HTMLConstructionSite.h */; };
97EF7DFE107E55B700D7C49C /* ScriptControllerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */; };
+ 9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */; };
+ 9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */; };
9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */; };
9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8605,6 +8607,8 @@
97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLConstructionSite.cpp; sourceTree = "<group>"; };
97EF560F11E40783007E026F /* HTMLConstructionSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLConstructionSite.h; sourceTree = "<group>"; };
97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptControllerBase.cpp; sourceTree = "<group>"; };
+ 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorProfilerAgent.cpp; sourceTree = "<group>"; };
+ 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorProfilerAgent.h; sourceTree = "<group>"; };
9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptDebugServer.cpp; sourceTree = "<group>"; };
9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugServer.h; sourceTree = "<group>"; };
9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = "<group>"; };
@@ -11799,6 +11803,8 @@
7A0E770B10C00A8800A0276E /* InspectorFrontendHost.cpp */,
7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */,
7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */,
+ 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */,
+ 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */,
41F062000F5F0B6600A07EAC /* InspectorResource.cpp */,
41F061FF0F5F0B6600A07EAC /* InspectorResource.h */,
7AB0B1BE1211A62200A76940 /* InspectorStorageAgent.cpp */,
@@ -20347,6 +20353,7 @@
2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */,
89C0DD7B121F0C69009E17CA /* FileSystemCallbacks.h in Headers */,
CE057FA61220731100A476D5 /* DocumentMarkerController.h in Headers */,
+ 9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -22800,6 +22807,7 @@
46A26905121B6B4300C41F3A /* FileWriter.cpp in Sources */,
89C0DD7A121F0C69009E17CA /* FileSystemCallbacks.cpp in Sources */,
CE057FA51220731100A476D5 /* DocumentMarkerController.cpp in Sources */,
+ 9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/bindings/js/ScriptProfiler.cpp b/WebCore/bindings/js/ScriptProfiler.cpp
index f372c3c..62ae9ba 100644
--- a/WebCore/bindings/js/ScriptProfiler.cpp
+++ b/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/WebCore/bindings/js/ScriptProfiler.h b/WebCore/bindings/js/ScriptProfiler.h
index 4fa331c..180c49f 100644
--- a/WebCore/bindings/js/ScriptProfiler.h
+++ b/WebCore/bindings/js/ScriptProfiler.h
@@ -41,6 +41,7 @@ public:
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
static void takeHeapSnapshot() { }
static long getProfilerLogLines(long, String*) { return 0; }
+ static bool isProfilerAlwaysEnabled();
};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptProfiler.cpp b/WebCore/bindings/v8/ScriptProfiler.cpp
index 9213774..0de4a24 100644
--- a/WebCore/bindings/v8/ScriptProfiler.cpp
+++ b/WebCore/bindings/v8/ScriptProfiler.cpp
@@ -69,4 +69,9 @@ long ScriptProfiler::getProfilerLogLines(long position, String* data)
return position;
}
+bool ScriptProfiler::isProfilerAlwaysEnabled()
+{
+ return true;
+}
+
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptProfiler.h b/WebCore/bindings/v8/ScriptProfiler.h
index 5c1054b..b1ab3b1 100644
--- a/WebCore/bindings/v8/ScriptProfiler.h
+++ b/WebCore/bindings/v8/ScriptProfiler.h
@@ -45,6 +45,7 @@ public:
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
static void takeHeapSnapshot();
static long getProfilerLogLines(long position, String* data);
+ static bool isProfilerAlwaysEnabled();
};
} // namespace WebCore
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index cd9052a..e647c90 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -38,6 +38,11 @@ $typeTransform{"ApplicationCache"} = {
"header" => "InspectorApplicationCacheAgent.h",
"handlerAccessor" => "m_inspectorController->applicationCacheAgent()",
};
+$typeTransform{"Profiler"} = {
+ "forward" => "InspectorProfilerAgent",
+ "header" => "InspectorProfilerAgent.h",
+ "handlerAccessor" => "m_inspectorController->profilerAgent()",
+};
$typeTransform{"Frontend"} = {
"forward" => "RemoteInspectorFrontend",
"header" => "RemoteInspectorFrontend.h",
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 92ff37b..392d1df 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -145,14 +145,14 @@ module core {
[handler=Controller] void enableProfiler(in boolean always);
[handler=Controller] void disableProfiler(in boolean always);
- [handler=Controller] void startProfiling();
- [handler=Controller] void stopProfiling();
+ [handler=Profiler] void startProfiling();
+ [handler=Profiler] void stopProfiling();
- [handler=Controller] void getProfileHeaders(in long callId, out Array headers);
- [handler=Controller] void getProfile(in long callId, in unsigned long uid, out Object profile);
+ [handler=Profiler] void getProfileHeaders(in long callId, out Array headers);
+ [handler=Profiler] void getProfile(in long callId, in unsigned long uid, out Object profile);
- [handler=Controller] void removeProfile(in unsigned long uid);
- [handler=Controller] void clearProfiles();
+ [handler=Profiler] void removeProfile(in unsigned long uid);
+ [handler=Profiler] void clearProfiles();
[handler=Backend] void takeHeapSnapshot();
[handler=Backend] void getProfilerLogLines(in long callId, in long inPosition, out long outPosition, out String log);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index ac670cb..89c9132 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -63,6 +63,7 @@
#include "InspectorDOMStorageResource.h"
#include "InspectorDatabaseResource.h"
#include "InspectorDebuggerAgent.h"
+#include "InspectorProfilerAgent.h"
#include "InspectorResource.h"
#include "InspectorStorageAgent.h"
#include "InspectorTimelineAgent.h"
@@ -115,8 +116,6 @@ using namespace std;
namespace WebCore {
-static const char* const UserInitiatedProfileName = "org.webkit.profiles.user-initiated";
-static const char* const CPUProfileType = "CPU";
static const char* const resourceTrackingEnabledSettingName = "resourceTrackingEnabled";
static const char* const debuggerEnabledSettingName = "debuggerEnabled";
static const char* const profilerEnabledSettingName = "profilerEnabled";
@@ -170,11 +169,7 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
, m_injectedScriptHost(InjectedScriptHost::create(this))
#if ENABLE(JAVASCRIPT_DEBUGGER)
, m_attachDebuggerWhenShown(false)
- , m_profilerEnabled(!WTF_USE_JSC)
- , m_recordingUserInitiatedProfile(false)
- , m_currentUserInitiatedProfileNumber(-1)
- , m_nextUserInitiatedProfileNumber(1)
- , m_startProfiling(this, &InspectorController::startUserInitiatedProfiling)
+ , m_profilerAgent(InspectorProfilerAgent::create(this))
#endif
{
ASSERT_ARG(page, page);
@@ -504,8 +499,11 @@ void InspectorController::connectFrontend()
String debuggerEnabled = setting(debuggerEnabledSettingName);
if (debuggerEnabled == "true" || m_attachDebuggerWhenShown)
enableDebugger();
- String profilerEnabled = setting(profilerEnabledSettingName);
- if (profilerEnabled == "true")
+ }
+ m_profilerAgent->setRemoteFrontend(m_remoteFrontend.get());
+ if (!ScriptProfiler::isProfilerAlwaysEnabled()) {
+ String profilerEnabledSetting = setting(profilerEnabledSettingName);
+ if (profilerEnabledSetting == "true")
enableProfiler();
}
#endif
@@ -594,7 +592,8 @@ void InspectorController::disconnectFrontend()
hideHighlight();
#if ENABLE(JAVASCRIPT_DEBUGGER)
- stopUserInitiatedProfiling();
+ m_profilerAgent->setRemoteFrontend(0);
+ m_profilerAgent->stopUserInitiatedProfiling();
#endif
releaseFrontendLifetimeAgents();
@@ -638,7 +637,7 @@ void InspectorController::populateScriptObjects()
m_remoteFrontend->monitoringXHRWasEnabled();
#if ENABLE(JAVASCRIPT_DEBUGGER)
- if (m_profilerEnabled)
+ if (m_profilerAgent->enabled())
m_remoteFrontend->profilerWasEnabled();
#endif
@@ -745,11 +744,7 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
m_debuggerAgent->clearForPageNavigation();
#endif
#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
- m_profiles.clear();
- m_currentUserInitiatedProfileNumber = 1;
- m_nextUserInitiatedProfileNumber = 1;
- if (m_remoteFrontend)
- m_remoteFrontend->resetProfilesPanel();
+ m_profilerAgent->resetState();
#endif
// unbindAllResources should be called before database and DOM storage
// resources are cleared so that it has a chance to unbind them.
@@ -1458,176 +1453,61 @@ void InspectorController::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsig
{
if (!enabled())
return;
-
- RefPtr<ScriptProfile> profile = prpProfile;
- m_profiles.add(profile->uid(), profile);
-
- if (m_remoteFrontend) {
- m_remoteFrontend->addProfileHeader(createProfileHeader(*profile));
- }
-
- addProfileFinishedMessageToConsole(profile, lineNumber, sourceURL);
+ m_profilerAgent->addProfile(prpProfile, lineNumber, sourceURL);
}
void InspectorController::addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
{
- RefPtr<ScriptProfile> profile = prpProfile;
-
- String title = profile->title();
- String message = String::format("Profile \"webkit-profile://%s/%s#%d\" finished.", CPUProfileType, encodeWithURLEscapeSequences(title).utf8().data(), profile->uid());
- addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
+ m_profilerAgent->addProfileFinishedMessageToConsole(prpProfile, lineNumber, sourceURL);
}
void InspectorController::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL)
{
- String message = String::format("Profile \"webkit-profile://%s/%s#0\" started.", CPUProfileType, encodeWithURLEscapeSequences(title).utf8().data());
- addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
-}
-
-void InspectorController::removeProfile(unsigned uid)
-{
- if (!enabled())
- return;
-
- if (m_profiles.contains(uid))
- m_profiles.remove(uid);
-}
-
-void InspectorController::clearProfiles()
-{
- if (!enabled())
- return;
-
- m_profiles.clear();
- m_currentUserInitiatedProfileNumber = 1;
- m_nextUserInitiatedProfileNumber = 1;
+ m_profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL);
}
-void InspectorController::getProfileHeaders(RefPtr<InspectorArray>* headers)
-{
- ProfilesMap::iterator profilesEnd = m_profiles.end();
- for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it)
- (*headers)->pushObject(createProfileHeader(*it->second));
-}
-void InspectorController::getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject)
+bool InspectorController::isRecordingUserInitiatedProfile() const
{
- ProfilesMap::iterator it = m_profiles.find(uid);
- if (it != m_profiles.end()) {
- *profileObject = createProfileHeader(*it->second);
- (*profileObject)->setObject("head", it->second->buildInspectorObjectForHead());
- }
-}
-
-PassRefPtr<InspectorObject> InspectorController::createProfileHeader(const ScriptProfile& profile)
-{
- RefPtr<InspectorObject> header = InspectorObject::create();
- header->setString("title", profile.title());
- header->setNumber("uid", profile.uid());
- header->setString("typeId", String(CPUProfileType));
- return header;
-}
-
-String InspectorController::getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false)
-{
- if (incrementProfileNumber)
- m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++;
-
- return String::format("%s.%d", UserInitiatedProfileName, m_currentUserInitiatedProfileNumber);
+ return m_profilerAgent->isRecordingUserInitiatedProfile();
}
-void InspectorController::startUserInitiatedProfilingSoon()
+String InspectorController::getCurrentUserInitiatedProfileName(bool incrementProfileNumber)
{
- m_startProfiling.startOneShot(0);
+ return m_profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber);
}
-void InspectorController::startUserInitiatedProfiling(Timer<InspectorController>*)
+void InspectorController::startUserInitiatedProfiling()
{
if (!enabled())
return;
-
- if (!profilerEnabled()) {
- enableProfiler(false, true);
- ScriptDebugServer::shared().recompileAllJSFunctions();
- }
-
- m_recordingUserInitiatedProfile = true;
-
- String title = getCurrentUserInitiatedProfileName(true);
-
-#if USE(JSC)
- JSC::ExecState* scriptState = toJSDOMWindow(m_inspectedPage->mainFrame(), debuggerWorld())->globalExec();
-#else
- ScriptState* scriptState = 0;
-#endif
- ScriptProfiler::start(scriptState, title);
-
- addStartProfilingMessageToConsole(title, 0, String());
-
- toggleRecordButton(true);
+ m_profilerAgent->startUserInitiatedProfiling();
}
void InspectorController::stopUserInitiatedProfiling()
{
if (!enabled())
return;
-
- m_recordingUserInitiatedProfile = false;
-
- String title = getCurrentUserInitiatedProfileName();
-
-#if USE(JSC)
- JSC::ExecState* scriptState = toJSDOMWindow(m_inspectedPage->mainFrame(), debuggerWorld())->globalExec();
-#else
- // Use null script state to avoid filtering by context security token.
- // All functions from all iframes should be visible from Inspector UI.
- ScriptState* scriptState = 0;
-#endif
- RefPtr<ScriptProfile> profile = ScriptProfiler::stop(scriptState, title);
- if (profile)
- addProfile(profile, 0, String());
-
- toggleRecordButton(false);
+ m_profilerAgent->stopUserInitiatedProfiling();
}
-void InspectorController::toggleRecordButton(bool isProfiling)
+bool InspectorController::profilerEnabled() const
{
- if (!m_remoteFrontend)
- return;
- m_remoteFrontend->setRecordingProfile(isProfiling);
+ return enabled() && m_profilerAgent->enabled();
}
void InspectorController::enableProfiler(bool always, bool skipRecompile)
{
if (always)
setSetting(profilerEnabledSettingName, "true");
-
- if (m_profilerEnabled)
- return;
-
- m_profilerEnabled = true;
-
- if (!skipRecompile)
- ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
-
- if (m_remoteFrontend)
- m_remoteFrontend->profilerWasEnabled();
+ m_profilerAgent->enable(skipRecompile);
}
void InspectorController::disableProfiler(bool always)
{
if (always)
setSetting(profilerEnabledSettingName, "false");
-
- if (!m_profilerEnabled)
- return;
-
- m_profilerEnabled = false;
-
- ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
-
- if (m_remoteFrontend)
- m_remoteFrontend->profilerWasDisabled();
+ m_profilerAgent->disable();
}
#endif
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 8d96005..4fe67ce 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -33,9 +33,7 @@
#include "Cookie.h"
#include "InspectorDOMAgent.h"
#include "PlatformString.h"
-#include "ScriptProfile.h"
#include "ScriptState.h"
-#include "Timer.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/ListHashSet.h>
@@ -65,6 +63,7 @@ class InspectorDatabaseResource;
class InspectorDebuggerAgent;
class InspectorFrontendClient;
class InspectorObject;
+class InspectorProfilerAgent;
class InspectorResource;
class InspectorStorageAgent;
class InspectorTimelineAgent;
@@ -78,6 +77,7 @@ class ResourceRequest;
class ResourceResponse;
class ResourceError;
class ScriptCallStack;
+class ScriptProfile;
class ScriptString;
class SharedBuffer;
class Storage;
@@ -228,20 +228,14 @@ public:
void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
- void removeProfile(unsigned);
- void clearProfiles();
-
- bool isRecordingUserInitiatedProfile() const { return m_recordingUserInitiatedProfile; }
-
- String getCurrentUserInitiatedProfileName(bool incrementProfileNumber);
- void startUserInitiatedProfiling(Timer<InspectorController>* = 0);
+ bool isRecordingUserInitiatedProfile() const;
+ String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
+ void startUserInitiatedProfiling();
void stopUserInitiatedProfiling();
- void startProfiling() { startUserInitiatedProfiling(); }
- void stopProfiling() { stopUserInitiatedProfiling(); }
-
void enableProfiler(bool always = false, bool skipRecompile = false);
void disableProfiler(bool always = false);
- bool profilerEnabled() const { return enabled() && m_profilerEnabled; }
+ bool profilerEnabled() const;
+ InspectorProfilerAgent* profilerAgent() const { return m_profilerAgent.get(); }
void enableDebugger();
void disableDebugger(bool always = false);
@@ -283,14 +277,9 @@ private:
void releaseFrontendLifetimeAgents();
#if ENABLE(JAVASCRIPT_DEBUGGER)
- typedef HashMap<unsigned int, RefPtr<ScriptProfile> > ProfilesMap;
- void startUserInitiatedProfilingSoon();
void toggleRecordButton(bool);
void enableDebuggerFromFrontend(bool always);
- void getProfileHeaders(RefPtr<InspectorArray>* headers);
- void getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject);
- PassRefPtr<InspectorObject> createProfileHeader(const ScriptProfile& profile);
#endif
#if ENABLE(DATABASE)
void selectDatabase(Database* database);
@@ -380,12 +369,7 @@ private:
bool m_attachDebuggerWhenShown;
OwnPtr<InspectorDebuggerAgent> m_debuggerAgent;
- bool m_profilerEnabled;
- bool m_recordingUserInitiatedProfile;
- int m_currentUserInitiatedProfileNumber;
- unsigned m_nextUserInitiatedProfileNumber;
- Timer<InspectorController> m_startProfiling;
- ProfilesMap m_profiles;
+ OwnPtr<InspectorProfilerAgent> m_profilerAgent;
#endif
#if ENABLE(WORKERS)
typedef HashMap<intptr_t, RefPtr<InspectorWorkerResource> > WorkersMap;
diff --git a/WebCore/inspector/InspectorProfilerAgent.cpp b/WebCore/inspector/InspectorProfilerAgent.cpp
new file mode 100644
index 0000000..5db3caa
--- /dev/null
+++ b/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 "InspectorProfilerAgent.h"
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include "Console.h"
+#include "InspectorController.h"
+#include "InspectorValues.h"
+#include "KURL.h"
+#include "Page.h"
+#include "RemoteInspectorFrontend.h"
+#include "ScriptDebugServer.h"
+#include "ScriptProfile.h"
+#include "ScriptProfiler.h"
+#include <wtf/OwnPtr.h>
+
+#if USE(JSC)
+#include "JSDOMWindow.h"
+#endif
+
+namespace WebCore {
+
+static const char* const UserInitiatedProfileName = "org.webkit.profiles.user-initiated";
+static const char* const CPUProfileType = "CPU";
+
+PassOwnPtr<InspectorProfilerAgent> InspectorProfilerAgent::create(InspectorController* inspectorController)
+{
+ OwnPtr<InspectorProfilerAgent> agent = adoptPtr(new InspectorProfilerAgent(inspectorController));
+ return agent.release();
+}
+
+InspectorProfilerAgent::InspectorProfilerAgent(InspectorController* inspectorController)
+ : m_inspectorController(inspectorController)
+ , m_remoteFrontend(0)
+ , m_enabled(ScriptProfiler::isProfilerAlwaysEnabled())
+ , m_recordingUserInitiatedProfile(false)
+ , m_currentUserInitiatedProfileNumber(-1)
+ , m_nextUserInitiatedProfileNumber(1)
+{
+}
+
+InspectorProfilerAgent::~InspectorProfilerAgent()
+{
+}
+
+void InspectorProfilerAgent::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
+{
+ RefPtr<ScriptProfile> profile = prpProfile;
+ m_profiles.add(profile->uid(), profile);
+ if (m_remoteFrontend)
+ m_remoteFrontend->addProfileHeader(createProfileHeader(*profile));
+ addProfileFinishedMessageToConsole(profile, lineNumber, sourceURL);
+}
+
+void InspectorProfilerAgent::addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
+{
+ RefPtr<ScriptProfile> profile = prpProfile;
+ String title = profile->title();
+ String message = String::format("Profile \"webkit-profile://%s/%s#%d\" finished.", CPUProfileType, encodeWithURLEscapeSequences(title).utf8().data(), profile->uid());
+ m_inspectorController->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
+}
+
+void InspectorProfilerAgent::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL)
+{
+ String message = String::format("Profile \"webkit-profile://%s/%s#0\" started.", CPUProfileType, encodeWithURLEscapeSequences(title).utf8().data());
+ m_inspectorController->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
+}
+
+PassRefPtr<InspectorObject> InspectorProfilerAgent::createProfileHeader(const ScriptProfile& profile)
+{
+ RefPtr<InspectorObject> header = InspectorObject::create();
+ header->setString("title", profile.title());
+ header->setNumber("uid", profile.uid());
+ header->setString("typeId", String(CPUProfileType));
+ return header;
+}
+
+void InspectorProfilerAgent::disable()
+{
+ if (!m_enabled)
+ return;
+ m_enabled = false;
+ ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
+ if (m_remoteFrontend)
+ m_remoteFrontend->profilerWasDisabled();
+}
+
+void InspectorProfilerAgent::enable(bool skipRecompile)
+{
+ if (m_enabled)
+ return;
+ m_enabled = true;
+ if (!skipRecompile)
+ ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
+ if (m_remoteFrontend)
+ m_remoteFrontend->profilerWasEnabled();
+}
+
+String InspectorProfilerAgent::getCurrentUserInitiatedProfileName(bool incrementProfileNumber)
+{
+ if (incrementProfileNumber)
+ m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++;
+
+ return String::format("%s.%d", UserInitiatedProfileName, m_currentUserInitiatedProfileNumber);
+}
+
+void InspectorProfilerAgent::getProfileHeaders(RefPtr<InspectorArray>* headers)
+{
+ ProfilesMap::iterator profilesEnd = m_profiles.end();
+ for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it)
+ (*headers)->pushObject(createProfileHeader(*it->second));
+}
+
+void InspectorProfilerAgent::getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject)
+{
+ ProfilesMap::iterator it = m_profiles.find(uid);
+ if (it != m_profiles.end()) {
+ *profileObject = createProfileHeader(*it->second);
+ (*profileObject)->setObject("head", it->second->buildInspectorObjectForHead());
+ }
+}
+
+void InspectorProfilerAgent::removeProfile(unsigned uid)
+{
+ if (m_profiles.contains(uid))
+ m_profiles.remove(uid);
+}
+
+void InspectorProfilerAgent::resetState()
+{
+ m_profiles.clear();
+ m_currentUserInitiatedProfileNumber = 1;
+ m_nextUserInitiatedProfileNumber = 1;
+ if (m_remoteFrontend)
+ m_remoteFrontend->resetProfilesPanel();
+}
+
+void InspectorProfilerAgent::startUserInitiatedProfiling()
+{
+ if (!enabled()) {
+ enable(false);
+ ScriptDebugServer::shared().recompileAllJSFunctions();
+ }
+ m_recordingUserInitiatedProfile = true;
+ String title = getCurrentUserInitiatedProfileName(true);
+#if USE(JSC)
+ JSC::ExecState* scriptState = toJSDOMWindow(m_inspectorController->inspectedPage()->mainFrame(), debuggerWorld())->globalExec();
+#else
+ ScriptState* scriptState = 0;
+#endif
+ ScriptProfiler::start(scriptState, title);
+ addStartProfilingMessageToConsole(title, 0, String());
+ toggleRecordButton(true);
+}
+
+void InspectorProfilerAgent::stopUserInitiatedProfiling()
+{
+ m_recordingUserInitiatedProfile = false;
+ String title = getCurrentUserInitiatedProfileName();
+#if USE(JSC)
+ JSC::ExecState* scriptState = toJSDOMWindow(m_inspectorController->inspectedPage()->mainFrame(), debuggerWorld())->globalExec();
+#else
+ // Use null script state to avoid filtering by context security token.
+ // All functions from all iframes should be visible from Inspector UI.
+ ScriptState* scriptState = 0;
+#endif
+ RefPtr<ScriptProfile> profile = ScriptProfiler::stop(scriptState, title);
+ if (profile)
+ addProfile(profile, 0, String());
+ toggleRecordButton(false);
+}
+
+void InspectorProfilerAgent::toggleRecordButton(bool isProfiling)
+{
+ if (m_remoteFrontend)
+ m_remoteFrontend->setRecordingProfile(isProfiling);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
diff --git a/WebCore/inspector/InspectorProfilerAgent.h b/WebCore/inspector/InspectorProfilerAgent.h
new file mode 100644
index 0000000..818377e
--- /dev/null
+++ b/WebCore/inspector/InspectorProfilerAgent.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 InspectorProfilerAgent_h
+#define InspectorProfilerAgent_h
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include "PlatformString.h"
+#include <wtf/Forward.h>
+#include <wtf/HashMap.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class InspectorArray;
+class InspectorController;
+class InspectorObject;
+class ScriptProfile;
+class RemoteInspectorFrontend;
+
+class InspectorProfilerAgent : public Noncopyable {
+public:
+ static PassOwnPtr<InspectorProfilerAgent> create(InspectorController*);
+ virtual ~InspectorProfilerAgent();
+
+ void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
+ void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
+ void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
+ void clearProfiles() { resetState(); }
+ void disable();
+ void enable(bool skipRecompile);
+ bool enabled() { return m_enabled; }
+ String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
+ void getProfileHeaders(RefPtr<InspectorArray>* headers);
+ void getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject);
+ bool isRecordingUserInitiatedProfile() { return m_recordingUserInitiatedProfile; }
+ void removeProfile(unsigned uid);
+ void resetState();
+ void setRemoteFrontend(RemoteInspectorFrontend* frontend) { m_remoteFrontend = frontend; }
+ void startProfiling() { startUserInitiatedProfiling(); }
+ void startUserInitiatedProfiling();
+ void stopProfiling() { stopUserInitiatedProfiling(); }
+ void stopUserInitiatedProfiling();
+ void toggleRecordButton(bool isProfiling);
+
+private:
+ typedef HashMap<unsigned int, RefPtr<ScriptProfile> > ProfilesMap;
+
+ InspectorProfilerAgent(InspectorController*);
+ PassRefPtr<InspectorObject> createProfileHeader(const ScriptProfile& profile);
+
+ InspectorController* m_inspectorController;
+ RemoteInspectorFrontend* m_remoteFrontend;
+ bool m_enabled;
+ bool m_recordingUserInitiatedProfile;
+ int m_currentUserInitiatedProfileNumber;
+ unsigned m_nextUserInitiatedProfileNumber;
+ ProfilesMap m_profiles;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+
+#endif // !defined(InspectorProfilerAgent_h)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list