summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/inspector/front-end/HeapSnapshotProxy.js')
-rw-r--r--Source/WebCore/inspector/front-end/HeapSnapshotProxy.js42
1 files changed, 24 insertions, 18 deletions
diff --git a/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js b/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js
index 765bae4da..1277da56b 100644
--- a/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js
+++ b/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js
@@ -65,11 +65,11 @@ WebInspector.HeapSnapshotRealWorker.prototype = {
this.dispatchEventToListeners("message", message);
else {
if (message.object !== "console") {
- console.log(WebInspector.UIString("Worker asks to call a method '%s' on unsupported object '%s'.", message.method, message.object));
+ console.log(WebInspector.UIString("Worker asks to call a method '%s' on an unsupported object '%s'.", message.method, message.object));
return;
}
if (message.method !== "log" && message.method !== "info" && message.method !== "error") {
- console.log(WebInspector.UIString("Worker asks to call unsuported method '%s' on console object.", message.method));
+ console.log(WebInspector.UIString("Worker asks to call an unsupported method '%s' on the console object.", message.method));
return;
}
console[message.method].apply(window[message.object], message.arguments);
@@ -245,6 +245,8 @@ WebInspector.HeapSnapshotWorker.prototype = {
startCheckingForLongRunningCalls: function()
{
+ if (this._interval)
+ return;
this._checkLongRunningCalls();
this._interval = setInterval(this._checkLongRunningCalls.bind(this), 300);
},
@@ -353,6 +355,7 @@ WebInspector.HeapSnapshotProxyObject.prototype = {
/**
* @constructor
* @extends {WebInspector.HeapSnapshotProxyObject}
+ * @implements {WebInspector.HeapSnapshotReceiver}
*/
WebInspector.HeapSnapshotLoaderProxy = function(worker, objectId)
{
@@ -363,6 +366,25 @@ WebInspector.HeapSnapshotLoaderProxy = function(worker, objectId)
WebInspector.HeapSnapshotLoaderProxy.prototype = {
/**
* @param {function(WebInspector.HeapSnapshotProxy)} callback
+ * @return {boolean}
+ */
+ startLoading: function(callback)
+ {
+ var loadingHasJustStarted = !this._onLoadCallbacks.length;
+ this._onLoadCallbacks.push(callback);
+ return loadingHasJustStarted;
+ },
+
+ /**
+ * @param {string} chunk
+ */
+ pushJSONChunk: function(chunk)
+ {
+ this.callMethod(null, "pushJSONChunk", chunk);
+ },
+
+ /**
+ * @param {function(WebInspector.HeapSnapshotProxy)} callback
*/
finishLoading: function(callback)
{
@@ -380,22 +402,6 @@ WebInspector.HeapSnapshotLoaderProxy.prototype = {
this._onLoadCallbacks = null;
}
this.callFactoryMethod(updateStaticData.bind(this), "finishLoading", "WebInspector.HeapSnapshotProxy");
- },
-
- /**
- * @param {function(WebInspector.HeapSnapshotProxy)} callback
- * @return {boolean}
- */
- startLoading: function(callback)
- {
- var loadingHasJustStarted = !this._onLoadCallbacks.length;
- this._onLoadCallbacks.push(callback);
- return loadingHasJustStarted;
- },
-
- pushJSONChunk: function(chunk)
- {
- this.callMethod(null, "pushJSONChunk", chunk);
}
};