2011-03-10 Greg Simon <gregsimon@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Need new graphic icon for garbage collect button.
https://bugs.webkit.org/show_bug.cgi?id=55794
No new tests: gc tests are flaky due to non-determinisic
behavior of collection APIs (more notes in bug)
* English.lproj/localizedStrings.js:
* WebCore.gypi:
* bindings/js/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::collectGarbage):
* bindings/js/ScriptProfiler.h:
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::collectGarbage):
* bindings/v8/ScriptProfiler.h:
* inspector/Inspector.idl:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::collectGarbage):
* inspector/InspectorProfilerAgent.h:
* inspector/front-end/Images/garbageCollectButtonGlyph.png: Added.
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.get statusBarItems):
(WebInspector.TimelinePanel.prototype._createStatusbarButtons):
(WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
* inspector/front-end/inspector.css:
(.garbage-collect-status-bar-item .glyph):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.cpp b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
index 8867023..d304c2c 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -40,6 +40,7 @@
#include "InstrumentingAgents.h"
#include "KURL.h"
#include "Page.h"
+#include "ScriptController.h"
#include "ScriptDebugServer.h"
#include "ScriptHeapSnapshot.h"
#include "ScriptProfile.h"
@@ -108,6 +109,11 @@
m_consoleAgent->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL);
}
+void InspectorProfilerAgent::collectGarbage(WebCore::ErrorString*)
+{
+ ScriptProfiler::collectGarbage();
+}
+
PassRefPtr<InspectorObject> InspectorProfilerAgent::createProfileHeader(const ScriptProfile& profile)
{
RefPtr<InspectorObject> header = InspectorObject::create();