Title: [126580] trunk/Source/WebCore
- Revision
- 126580
- Author
- [email protected]
- Date
- 2012-08-24 06:30:11 -0700 (Fri, 24 Aug 2012)
Log Message
Web Inspector: do not send profile headers to the front-end until explicitly requested.
https://bugs.webkit.org/show_bug.cgi?id=94928
Reviewed by Vsevolod Vlasov.
Simple flag is added.
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore):
(WebCore::InspectorProfilerAgent::resetFrontendProfiles):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (126579 => 126580)
--- trunk/Source/WebCore/ChangeLog 2012-08-24 13:25:40 UTC (rev 126579)
+++ trunk/Source/WebCore/ChangeLog 2012-08-24 13:30:11 UTC (rev 126580)
@@ -1,5 +1,24 @@
2012-08-24 Pavel Feldman <[email protected]>
+ Web Inspector: do not send profile headers to the front-end until explicitly requested.
+ https://bugs.webkit.org/show_bug.cgi?id=94928
+
+ Reviewed by Vsevolod Vlasov.
+
+ Simple flag is added.
+
+ * inspector/InspectorProfilerAgent.cpp:
+ (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
+ (WebCore::InspectorProfilerAgent::addProfile):
+ (WebCore::InspectorProfilerAgent::disable):
+ (WebCore::InspectorProfilerAgent::getProfileHeaders):
+ (WebCore):
+ (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
+ * inspector/InspectorProfilerAgent.h:
+ (InspectorProfilerAgent):
+
+2012-08-24 Pavel Feldman <[email protected]>
+
Web Inspector: make ui component compile
https://bugs.webkit.org/show_bug.cgi?id=94827
Modified: trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp (126579 => 126580)
--- trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp 2012-08-24 13:25:40 UTC (rev 126579)
+++ trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp 2012-08-24 13:30:11 UTC (rev 126580)
@@ -123,6 +123,7 @@
, m_frontend(0)
, m_enabled(false)
, m_recordingUserInitiatedProfile(false)
+ , m_headersRequested(false)
, m_currentUserInitiatedProfileNumber(-1)
, m_nextUserInitiatedProfileNumber(1)
, m_nextUserInitiatedHeapSnapshotNumber(1)
@@ -139,7 +140,7 @@
{
RefPtr<ScriptProfile> profile = ""
m_profiles.add(profile->uid(), profile);
- if (m_frontend)
+ if (m_frontend && m_headersRequested)
m_frontend->addProfileHeader(createProfileHeader(*profile));
addProfileFinishedMessageToConsole(profile, lineNumber, sourceURL);
}
@@ -220,6 +221,7 @@
if (!m_enabled)
return;
m_enabled = false;
+ m_headersRequested = false;
PageScriptDebugServer::shared().recompileAllJSFunctionsSoon();
}
@@ -242,6 +244,7 @@
void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::ProfileHeader> >& headers)
{
+ m_headersRequested = true;
headers = TypeBuilder::Array<TypeBuilder::Profiler::ProfileHeader>::create();
ProfilesMap::iterator profilesEnd = m_profiles.end();
@@ -321,7 +324,7 @@
void InspectorProfilerAgent::resetFrontendProfiles()
{
- if (m_frontend && enabled()
+ if (m_headersRequested && m_frontend
&& m_profiles.begin() == m_profiles.end()
&& m_snapshots.begin() == m_snapshots.end())
m_frontend->resetProfiles();
Modified: trunk/Source/WebCore/inspector/InspectorProfilerAgent.h (126579 => 126580)
--- trunk/Source/WebCore/inspector/InspectorProfilerAgent.h 2012-08-24 13:25:40 UTC (rev 126579)
+++ trunk/Source/WebCore/inspector/InspectorProfilerAgent.h 2012-08-24 13:30:11 UTC (rev 126580)
@@ -119,6 +119,7 @@
InspectorFrontend::Profiler* m_frontend;
bool m_enabled;
bool m_recordingUserInitiatedProfile;
+ bool m_headersRequested;
int m_currentUserInitiatedProfileNumber;
unsigned m_nextUserInitiatedProfileNumber;
unsigned m_nextUserInitiatedHeapSnapshotNumber;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes