Changeset 80723 in webkit
- Timestamp:
- Mar 10, 2011 8:36:53 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80721 r80723 1 2011-03-10 Greg Simon <gregsimon@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Need new graphic icon for garbage collect button. 6 https://bugs.webkit.org/show_bug.cgi?id=55794 7 8 No new tests: gc tests are flaky due to non-determinisic 9 behavior of collection APIs (more notes in bug) 10 11 * English.lproj/localizedStrings.js: 12 * WebCore.gypi: 13 * bindings/js/ScriptProfiler.cpp: 14 (WebCore::ScriptProfiler::collectGarbage): 15 * bindings/js/ScriptProfiler.h: 16 * bindings/v8/ScriptProfiler.cpp: 17 (WebCore::ScriptProfiler::collectGarbage): 18 * bindings/v8/ScriptProfiler.h: 19 * inspector/Inspector.idl: 20 * inspector/InspectorProfilerAgent.cpp: 21 (WebCore::InspectorProfilerAgent::collectGarbage): 22 * inspector/InspectorProfilerAgent.h: 23 * inspector/front-end/Images/garbageCollectButtonGlyph.png: Added. 24 * inspector/front-end/TimelinePanel.js: 25 (WebInspector.TimelinePanel.prototype.get statusBarItems): 26 (WebInspector.TimelinePanel.prototype._createStatusbarButtons): 27 (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked): 28 * inspector/front-end/inspector.css: 29 (.garbage-collect-status-bar-item .glyph): 30 1 31 2011-03-10 Andrey Kosyakov <caseq@chromium.org> 2 32 -
trunk/Source/WebCore/WebCore.gypi
r80611 r80723 5338 5338 'inspector/front-end/Images/helpButtonGlyph.png', 5339 5339 'inspector/front-end/Images/largerResourcesButtonGlyph.png', 5340 'inspector/front-end/Images/garbageCollectButtonGlyph.png', 5340 5341 'inspector/front-end/Images/localStorage.png', 5341 5342 'inspector/front-end/Images/networkIcon.png', -
trunk/Source/WebCore/bindings/js/ScriptProfiler.cpp
r76792 r80723 31 31 #include "ScriptProfiler.h" 32 32 33 #include "GCController.h" 33 34 #include "JSDOMBinding.h" 34 35 #include <profiler/Profiler.h> 35 36 36 37 namespace WebCore { 38 39 void ScriptProfiler::collectGarbage() 40 { 41 gcController().garbageCollectNow(); 42 } 37 43 38 44 void ScriptProfiler::start(ScriptState* state, const String& title) -
trunk/Source/WebCore/bindings/js/ScriptProfiler.h
r76792 r80723 48 48 }; 49 49 50 static void collectGarbage(); 50 51 static void start(ScriptState* state, const String& title); 51 52 static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title); -
trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp
r76792 r80723 54 54 } 55 55 56 void ScriptProfiler::collectGarbage() 57 { 58 // NOTE : There is currently no direct way to collect memory from the v8 C++ API 59 // but notifying low-memory forces a mark-compact, which is exactly what we want 60 // in this case. 61 v8::V8::LowMemoryNotification(); 62 } 63 56 64 namespace { 57 65 -
trunk/Source/WebCore/bindings/v8/ScriptProfiler.h
r76792 r80723 54 54 }; 55 55 56 static void collectGarbage(); 56 57 static void start(ScriptState* state, const String& title); 57 58 static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title); -
trunk/Source/WebCore/inspector/Inspector.idl
r80713 r80723 272 272 void takeHeapSnapshot(in boolean detailed); 273 273 void getExactHeapSnapshotNodeRetainedSize(in unsigned long uid, in unsigned long nodeId, out long size); 274 void collectGarbage(); 274 275 [event] void addProfileHeader(out Object header); 275 276 [event] void addHeapSnapshotChunk(out unsigned long uid, out String chunk); -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r80350 r80723 41 41 #include "KURL.h" 42 42 #include "Page.h" 43 #include "ScriptController.h" 43 44 #include "ScriptDebugServer.h" 44 45 #include "ScriptHeapSnapshot.h" … … 107 108 String message = makeString("Profile \"webkit-profile://", CPUProfileType, '/', encodeWithURLEscapeSequences(title), "#0\" started."); 108 109 m_consoleAgent->addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL); 110 } 111 112 void InspectorProfilerAgent::collectGarbage(WebCore::ErrorString*) 113 { 114 ScriptProfiler::collectGarbage(); 109 115 } 110 116 -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.h
r80350 r80723 62 62 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL); 63 63 void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL); 64 void collectGarbage(ErrorString*); 64 65 void clearProfiles(ErrorString*) { resetState(); } 65 66 void disable(); -
trunk/Source/WebCore/inspector/front-end/TimelinePanel.js
r80416 r80723 148 148 get statusBarItems() 149 149 { 150 return [this.toggleFilterButton.element, this.toggleTimelineButton.element, this. clearButton.element, this._overviewPane.statusBarFilters];150 return [this.toggleFilterButton.element, this.toggleTimelineButton.element, this.garbageCollectButton.element, this.clearButton.element, this._overviewPane.statusBarFilters]; 151 151 }, 152 152 … … 210 210 this.toggleFilterButton.addEventListener("click", this._toggleFilterButtonClicked.bind(this), false); 211 211 212 this.garbageCollectButton = new WebInspector.StatusBarButton(WebInspector.UIString("Collect Garbage"), "garbage-collect-status-bar-item"); 213 this.garbageCollectButton.addEventListener("click", this._garbageCollectButtonClicked.bind(this), false); 214 212 215 this.recordsCounter = document.createElement("span"); 213 216 this.recordsCounter.className = "timeline-records-counter"; … … 284 287 this.toggleFilterButton.element.title = this._calculator._showShortEvents ? this._hideShortRecordsTitleText : this._showShortRecordsTitleText; 285 288 this._scheduleRefresh(true); 289 }, 290 291 _garbageCollectButtonClicked: function() 292 { 293 ProfilerAgent.collectGarbage(); 286 294 }, 287 295 -
trunk/Source/WebCore/inspector/front-end/WebKit.qrc
r80102 r80723 175 175 <file>Images/forward.png</file> 176 176 <file>Images/frame.png</file> 177 <file>Images/garbageCollectButtonGlyph.png</file> 177 178 <file>Images/gearButtonGlyph.png</file> 178 179 <file>Images/glossyHeader.png</file> -
trunk/Source/WebCore/inspector/front-end/inspector.css
r80708 r80723 3936 3936 } 3937 3937 3938 .garbage-collect-status-bar-item .glyph { 3939 -webkit-mask-image: url(Images/garbageCollectButtonGlyph.png); 3940 } 3941 3938 3942 .timeline-records-counter, .storage-application-cache-status, .storage-application-cache-connectivity { 3939 3943 font-size: 11px;
Note: See TracChangeset
for help on using the changeset viewer.