From f1cd246dc003e994c8394e9b2bbaa2e40497d83f Mon Sep 17 00:00:00 2001 From: "loislo@chromium.org" Date: Mon, 5 Mar 2012 15:24:45 +0000 Subject: [PATCH] Web Inspector: [chromium] introduce HeapSnapshot performance test. https://bugs.webkit.org/show_bug.cgi?id=80280 Reviewed by Pavel Feldman. PerformanceTests: * inspector/detailed-heapshots-smoke-test.html: Added. Source/WebCore: * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData): (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading): (WebInspector.HeapSnapshotLoaderProxy.prototype._callLoadCallbacks): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109743 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- PerformanceTests/ChangeLog | 9 ++++ .../inspector/detailed-heapshots-smoke-test.html | 55 ++++++++++++++++++++++ Source/WebCore/ChangeLog | 12 +++++ .../inspector/front-end/HeapSnapshotProxy.js | 14 +++--- 4 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 PerformanceTests/inspector/detailed-heapshots-smoke-test.html diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog index 56ba375..38bc164 100644 --- a/PerformanceTests/ChangeLog +++ b/PerformanceTests/ChangeLog @@ -1,3 +1,12 @@ +2012-03-05 Ilya Tikhonovsky + + Web Inspector: [chromium] introduce HeapSnapshot performance test. + https://bugs.webkit.org/show_bug.cgi?id=80280 + + Reviewed by Pavel Feldman. + + * inspector/detailed-heapshots-smoke-test.html: Added. + 2012-03-01 Ryosuke Niwa DOM tests take too long to run diff --git a/PerformanceTests/inspector/detailed-heapshots-smoke-test.html b/PerformanceTests/inspector/detailed-heapshots-smoke-test.html new file mode 100644 index 0000000..7912324 --- /dev/null +++ b/PerformanceTests/inspector/detailed-heapshots-smoke-test.html @@ -0,0 +1,55 @@ + + + + + + + + + + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index ba6253e..6e262b6 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2012-03-05 Ilya Tikhonovsky + + Web Inspector: [chromium] introduce HeapSnapshot performance test. + https://bugs.webkit.org/show_bug.cgi?id=80280 + + Reviewed by Pavel Feldman. + + * inspector/front-end/HeapSnapshotProxy.js: + (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData): + (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading): + (WebInspector.HeapSnapshotLoaderProxy.prototype._callLoadCallbacks): + 2012-03-05 Pavel Feldman Web Inspector: cannot be launched when localStorage is disabled diff --git a/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js b/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js index 2b2823a..fe98f3c 100644 --- a/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js +++ b/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js @@ -263,20 +263,22 @@ WebInspector.HeapSnapshotLoaderProxy.prototype = { delete this._onLoadCallbacks; this._loading = false; this._loaded = true; - function callLoadCallbacks(snapshotProxy) - { - for (var i = 0; i < loadCallbacks.length; ++i) - loadCallbacks[i](snapshotProxy); - } + var self = this; function updateStaticData(snapshotProxy) { this.dispose(); - snapshotProxy.updateStaticData(callLoadCallbacks); + snapshotProxy.updateStaticData(this._callLoadCallbacks.bind(this, loadCallbacks)); } this.callFactoryMethod(updateStaticData.bind(this), "finishLoading", "WebInspector.HeapSnapshotProxy"); return true; }, + _callLoadCallbacks: function(loadCallbacks, snapshotProxy) + { + for (var i = 0; i < loadCallbacks.length; ++i) + loadCallbacks[i](snapshotProxy); + }, + get loaded() { return this._loaded; -- 2.7.4