Title: [109927] trunk
Revision
109927
Author
pfeld...@chromium.org
Date
2012-03-06 09:17:13 -0800 (Tue, 06 Mar 2012)

Log Message

Web Inspector: add support for inspection of huge (1M elements) arrays.
https://bugs.webkit.org/show_bug.cgi?id=80421

Reviewed by Vsevolod Vlasov.

Source/WebCore:

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.completionsForExpression.evaluated):
* inspector/front-end/ElementsPanel.js:
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.update.callback):
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertiesSection.prototype.updateProperties):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
(WebInspector.ArrayGroupingTreeElement):
(WebInspector.ArrayGroupingTreeElement._populateArray):
(WebInspector.ArrayGroupingTreeElement._populateRanges):
(WebInspector.ArrayGroupingTreeElement._populateRanges.callback):
(WebInspector.ArrayGroupingTreeElement._populateAsFragment):
(WebInspector.ArrayGroupingTreeElement._populateAsFragment.processArrayFragment):
(WebInspector.ArrayGroupingTreeElement._populateAsFragment.processProperties):
(WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.buildObjectFragment):
(WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.processObjectFragment):
(WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.processProperties):
(WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties):
(WebInspector.ArrayGroupingTreeElement.prototype.onpopulate):
(WebInspector.ArrayGroupingTreeElement.prototype.onattach):
* inspector/front-end/PropertiesSidebarPane.js:
(WebInspector.PropertiesSidebarPane.prototype.update.nodeResolved):
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.callFunctionJSON):

LayoutTests:

* http/tests/inspector/indexeddb/database-data.html:
* inspector/console/console-big-array.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (109926 => 109927)


--- trunk/LayoutTests/ChangeLog	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/LayoutTests/ChangeLog	2012-03-06 17:17:13 UTC (rev 109927)
@@ -1,3 +1,13 @@
+2012-03-06  Pavel Feldman  <pfeld...@chromium.org>
+
+        Web Inspector: add support for inspection of huge (1M elements) arrays.
+        https://bugs.webkit.org/show_bug.cgi?id=80421
+
+        Reviewed by Vsevolod Vlasov.
+
+        * http/tests/inspector/indexeddb/database-data.html:
+        * inspector/console/console-big-array.html:
+
 2012-03-06  Stephen White  <senorbla...@chromium.org>
 
         [chromium] Rebaseline some SVG tests now giving correct results.

Modified: trunk/LayoutTests/http/tests/inspector/indexeddb/database-data.html (109926 => 109927)


--- trunk/LayoutTests/http/tests/inspector/indexeddb/database-data.html	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/LayoutTests/http/tests/inspector/indexeddb/database-data.html	2012-03-06 17:17:13 UTC (rev 109927)
@@ -56,7 +56,7 @@
                     return;
                 }
                 entry = entries[index];
-                entry.value.callFunctionJSON(dumpMe, dumped.bind(this));
+                entry.value.callFunctionJSON(dumpMe, undefined, dumped.bind(this));
                 ++index;
             }
 

Modified: trunk/LayoutTests/inspector/console/console-big-array.html (109926 => 109927)


--- trunk/LayoutTests/inspector/console/console-big-array.html	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/LayoutTests/inspector/console/console-big-array.html	2012-03-06 17:17:13 UTC (rev 109927)
@@ -38,13 +38,33 @@
         }
     }
 
-    InspectorTest.runAfterPendingDispatches(dumpConsoleMessages);
+    InspectorTest.addSniffer(WebInspector.ArrayGroupingTreeElement.prototype, "onpopulate", populateCalled, true);
+    var populated = false;
+    function populateCalled()
+    {
+        populated = this._toIndex === 24;
+    }
 
-    function dumpConsoleMessages()
+    InspectorTest.runAfterPendingDispatches(expandRecursively);
+
+    function expandRecursively()
     {
-        for (var i = 0; i < sections.length; ++i)
-            for (var j = 0; j < sections[i].propertiesTreeOutline.children.length; ++j)
-                sections[i].propertiesTreeOutline.children[j].expandRecursively();
+        for (var i = 0; i < sections.length; ++i) {
+            for (var j = 0; j < sections[i].propertiesTreeOutline.children.length; ++j) {
+                for (var treeElement = sections[i].propertiesTreeOutline.children[j]; treeElement; treeElement = treeElement.traverseNextTreeElement(false, null, false)) {
+                    if (treeElement.listItemElement.textContent.indexOf("__proto__") === -1)
+                        treeElement.expand();
+                }
+            }
+        }
+        if (populated)
+            InspectorTest.runAfterPendingDispatches(completeTest);
+        else
+            InspectorTest.runAfterPendingDispatches(expandRecursively);
+    }
+
+    function completeTest()
+    {
         InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(WebInspector.consoleView.messagesElement));
         InspectorTest.completeTest();
     }

Modified: trunk/Source/WebCore/ChangeLog (109926 => 109927)


--- trunk/Source/WebCore/ChangeLog	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/Source/WebCore/ChangeLog	2012-03-06 17:17:13 UTC (rev 109927)
@@ -1,3 +1,38 @@
+2012-03-06  Pavel Feldman  <pfeld...@chromium.org>
+
+        Web Inspector: add support for inspection of huge (1M elements) arrays.
+        https://bugs.webkit.org/show_bug.cgi?id=80421
+
+        Reviewed by Vsevolod Vlasov.
+
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView.prototype.completionsForExpression.evaluated):
+        * inspector/front-end/ElementsPanel.js:
+        * inspector/front-end/ObjectPropertiesSection.js:
+        (WebInspector.ObjectPropertiesSection.prototype.update.callback):
+        (WebInspector.ObjectPropertiesSection.prototype.update):
+        (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
+        (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
+        (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
+        (WebInspector.ArrayGroupingTreeElement):
+        (WebInspector.ArrayGroupingTreeElement._populateArray):
+        (WebInspector.ArrayGroupingTreeElement._populateRanges):
+        (WebInspector.ArrayGroupingTreeElement._populateRanges.callback):
+        (WebInspector.ArrayGroupingTreeElement._populateAsFragment):
+        (WebInspector.ArrayGroupingTreeElement._populateAsFragment.processArrayFragment):
+        (WebInspector.ArrayGroupingTreeElement._populateAsFragment.processProperties):
+        (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.buildObjectFragment):
+        (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.processObjectFragment):
+        (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.processProperties):
+        (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties):
+        (WebInspector.ArrayGroupingTreeElement.prototype.onpopulate):
+        (WebInspector.ArrayGroupingTreeElement.prototype.onattach):
+        * inspector/front-end/PropertiesSidebarPane.js:
+        (WebInspector.PropertiesSidebarPane.prototype.update.nodeResolved):
+        * inspector/front-end/RemoteObject.js:
+        (WebInspector.RemoteObject.prototype.callFunction):
+        (WebInspector.RemoteObject.prototype.callFunctionJSON):
+
 2012-03-06  Vsevolod Vlasov  <vse...@chromium.org>
 
         Web Inspector: Open link in resources panel only works the second time

Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (109926 => 109927)


--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2012-03-06 17:17:13 UTC (rev 109927)
@@ -409,7 +409,7 @@
             }
 
             if (result.type === "object" || result.type === "function")
-                result.callFunctionJSON(getCompletions, receivedPropertyNames.bind(this));
+                result.callFunctionJSON(getCompletions, undefined, receivedPropertyNames.bind(this));
             else if (result.type === "string" || result.type === "number" || result.type === "boolean")
                 this.evalInInspectedWindow("(" + getCompletions + ")(\"" + result.type + "\")", "completion", false, true, true, receivedPropertyNamesFromEval.bind(this));
         }

Modified: trunk/Source/WebCore/inspector/front-end/ElementsPanel.js (109926 => 109927)


--- trunk/Source/WebCore/inspector/front-end/ElementsPanel.js	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/Source/WebCore/inspector/front-end/ElementsPanel.js	2012-03-06 17:17:13 UTC (rev 109927)
@@ -381,7 +381,7 @@
                 return;
             }
 
-            object.callFunctionJSON(dimensions, callback);
+            object.callFunctionJSON(dimensions, undefined, callback);
             object.release();
 
             function dimensions()

Modified: trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js (109926 => 109927)


--- trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js	2012-03-06 17:17:13 UTC (rev 109927)
@@ -48,6 +48,8 @@
     WebInspector.PropertiesSection.call(this, title, subtitle);
 }
 
+WebInspector.ObjectPropertiesSection._arrayLoadThreshold = 100;
+
 WebInspector.ObjectPropertiesSection.prototype = {
     onpopulate: function()
     {
@@ -56,17 +58,23 @@
 
     update: function()
     {
-        var self = this;
+        if (this.object.arrayLength() > WebInspector.ObjectPropertiesSection._arrayLoadThreshold) {
+            this.propertiesTreeOutline.removeChildren();
+            WebInspector.ArrayGroupingTreeElement._populateArray(this.propertiesTreeOutline, this.object, 0, this.object.arrayLength() - 1);
+            return;
+        }
+
         function callback(properties)
         {
             if (!properties)
                 return;
-            self.updateProperties(properties);
+            this.updateProperties(properties);
         }
+
         if (this.ignoreHasOwnProperty)
-            this.object.getAllProperties(callback);
+            this.object.getAllProperties(callback.bind(this));
         else
-            this.object.getOwnProperties(callback);
+            this.object.getOwnProperties(callback.bind(this));
     },
 
     updateProperties: function(properties, rootTreeElementConstructor, rootPropertyComparer)
@@ -93,11 +101,6 @@
 
         this.propertiesForTest = properties;
 
-        if (this.object && this.object.arrayLength() > WebInspector.ArrayGroupingTreeElement._bucketThreshold) {
-            WebInspector.ArrayGroupingTreeElement.populateAsArray(this.propertiesTreeOutline, rootTreeElementConstructor, properties);
-            return;
-        } 
-
         for (var i = 0; i < properties.length; ++i)
             this.propertiesTreeOutline.appendChild(new rootTreeElementConstructor(properties[i]));
 
@@ -161,6 +164,7 @@
 /**
  * @constructor
  * @extends {TreeElement}
+ * @param {WebInspector.RemoteObjectProperty} property
  */
 WebInspector.ObjectPropertyTreeElement = function(property)
 {
@@ -178,16 +182,18 @@
         if (this.children.length && !this.shouldRefreshChildren)
             return;
 
-        var callback = function(properties) {
+        if (this.property.value.arrayLength() > WebInspector.ObjectPropertiesSection._arrayLoadThreshold) {
             this.removeChildren();
+            WebInspector.ArrayGroupingTreeElement._populateArray(this, this.property.value, 0, this.property.value.arrayLength() - 1);
+            return;
+        }
+
+        function callback(properties)
+        {
+            this.removeChildren();
             if (!properties)
                 return;
 
-            if (this.property.value.type === "array") {
-                WebInspector.ArrayGroupingTreeElement.populateAsArray(this, this.treeOutline.section.treeElementConstructor, properties);
-                return;
-            }
-
             properties.sort(WebInspector.ObjectPropertiesSection.CompareProperties);
             for (var i = 0; i < properties.length; ++i) {
                 if (this.treeOutline.section.skipProto && properties[i].name === "__proto__")
@@ -195,7 +201,8 @@
                 properties[i].parentObject = this.property.value;
                 this.appendChild(new this.treeOutline.section.treeElementConstructor(properties[i]));
             }
-        };
+        }
+
         this.property.value.getOwnProperties(callback.bind(this));
     },
 
@@ -418,80 +425,210 @@
 /**
  * @constructor
  * @extends {TreeElement}
+ * @param {WebInspector.RemoteObject} object
+ * @param {number} fromIndex
+ * @param {number} toIndex
+ * @param {number} propertyCount
  */
-WebInspector.ArrayGroupingTreeElement = function(treeElementConstructor, properties, fromIndex, toIndex)
+WebInspector.ArrayGroupingTreeElement = function(object, fromIndex, toIndex, propertyCount)
 {
-    this._properties = properties;
+    TreeElement.call(this, String.sprintf("[%d \u2026 %d]", fromIndex, toIndex), undefined, true);
     this._fromIndex = fromIndex;
     this._toIndex = toIndex;
-    this._treeElementConstructor = treeElementConstructor;
-
-    TreeElement.call(this, "[" + this._properties[fromIndex].name + " \u2026 " + this._properties[toIndex - 1].name + "]", null, true);
+    this._object = object;
+    this._readOnly = true;
+    this._propertyCount = propertyCount;
+    this._populated = false;
 }
 
 WebInspector.ArrayGroupingTreeElement._bucketThreshold = 20;
 
-WebInspector.ArrayGroupingTreeElement.populateAsArray = function(parentTreeElement, treeElementConstructor, properties)
+/**
+ * @param {TreeElement|TreeOutline} treeElement
+ * @param {WebInspector.RemoteObject} object
+ * @param {number} fromIndex
+ * @param {number} toIndex
+ */
+WebInspector.ArrayGroupingTreeElement._populateArray = function(treeElement, object, fromIndex, toIndex)
 {
-    var nonIndexProperties = [];
+    WebInspector.ArrayGroupingTreeElement._populateRanges(treeElement, object, fromIndex, toIndex, true);
+}
 
-    for (var i = properties.length - 1; i >= 0; --i) {
-        if (!isNaN(properties[i].name)) {
-            // We've reached index properties, trim properties and break.
-            properties.length = i + 1;
-            break;
+/**
+ * @param {TreeElement|TreeOutline} treeElement
+ * @param {WebInspector.RemoteObject} object
+ * @param {number} fromIndex
+ * @param {number} toIndex
+ * @param {boolean} topLevel
+ */
+WebInspector.ArrayGroupingTreeElement._populateRanges = function(treeElement, object, fromIndex, toIndex, topLevel)
+{
+    object.callFunctionJSON(packRanges, [{value: fromIndex}, {value: toIndex}, {value: WebInspector.ArrayGroupingTreeElement._bucketThreshold}], callback.bind(this));
+
+    function packRanges(fromIndex, toIndex, bucketThreshold)
+    {
+        var count = 0;
+        for (var i = fromIndex; i <= toIndex; ++i) {
+            var value = this[i];
+            if (typeof value !== "undefined")
+                ++count;
         }
 
-        nonIndexProperties.push(properties[i]);
+        var bucketSize;
+        if (count < bucketThreshold)
+            bucketSize = count;
+        else {
+            bucketSize = Math.ceil(count / bucketThreshold);
+            if (bucketSize < bucketThreshold)
+                bucketSize = Math.floor(Math.sqrt(count));
+        }
+
+        var ranges = [];
+        count = 0;
+        var groupStart = -1;
+        var groupEnd = 0;
+        for (var i = fromIndex; i <= toIndex; ++i) {
+            var value = this[i];
+            if (typeof value === "undefined")
+                continue;
+
+            if (groupStart === -1)
+                groupStart = i;
+
+            groupEnd = i;
+            if (++count === bucketSize) {
+                ranges.push([groupStart, groupEnd, count]);
+                count = 0;
+                groupStart = -1;
+            }
+        }
+
+        if (count > 0)
+            ranges.push([groupStart, groupEnd, count]);
+        return ranges;
     }
 
-    WebInspector.ArrayGroupingTreeElement._populate(parentTreeElement, treeElementConstructor, properties, 0, properties.length);
+    function callback(ranges)
+    {
+        if (ranges.length == 1)
+            WebInspector.ArrayGroupingTreeElement._populateAsFragment(treeElement, object, ranges[0][0], ranges[0][1]);
+        else {
+            for (var i = 0; i < ranges.length; ++i) {
+                var fromIndex = ranges[i][0];
+                var toIndex = ranges[i][1];
+                var count = ranges[i][2];
+                if (fromIndex == toIndex)
+                    WebInspector.ArrayGroupingTreeElement._populateAsFragment(treeElement, object, fromIndex, toIndex);
+                else
+                    treeElement.appendChild(new WebInspector.ArrayGroupingTreeElement(object, fromIndex, toIndex, count));
+            }
+        }
+        if (topLevel)
+            WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties(treeElement, object);
+    }
+}
 
-    nonIndexProperties.sort(WebInspector.ObjectPropertiesSection.CompareProperties);
-    for (var i = 0; i < nonIndexProperties.length; ++i) {
-        var treeElement = new treeElementConstructor(nonIndexProperties[i]);
-        treeElement._readOnly = true; 
-        parentTreeElement.appendChild(treeElement);
+/**
+ * @param {TreeElement|TreeOutline} treeElement
+ * @param {WebInspector.RemoteObject} object
+ * @param {number} fromIndex
+ * @param {number} toIndex
+ */
+WebInspector.ArrayGroupingTreeElement._populateAsFragment = function(treeElement, object, fromIndex, toIndex)
+{
+    object.callFunction(buildArrayFragment, [{value: fromIndex}, {value: toIndex}], processArrayFragment.bind(this));
+
+    function buildArrayFragment(fromIndex, toIndex)
+    {
+        var result = Object.create(null);
+        for (var i = fromIndex; i <= toIndex; ++i) {
+            var value = this[i];
+            if (typeof value !== "undefined")
+                result[i] = value;
+        }
+        return result;
     }
+
+    function processArrayFragment(arrayFragment)
+    {
+        arrayFragment.getAllProperties(processProperties.bind(this));
+    }
+
+    function processProperties(properties)
+    {
+        if (!properties)
+            return;
+
+        properties.sort(WebInspector.ObjectPropertiesSection.CompareProperties);
+        for (var i = 0; i < properties.length; ++i) {
+            properties[i].parentObject = this._object;
+            var childTreeElement = new treeElement.treeOutline.section.treeElementConstructor(properties[i]);
+            childTreeElement._readOnly = true;
+            treeElement.appendChild(childTreeElement);
+        }
+    }
 }
 
-WebInspector.ArrayGroupingTreeElement._populate = function(parentTreeElement, treeElementConstructor, properties, fromIndex, toIndex)
+/**
+ * @param {TreeElement|TreeOutline} treeElement
+ * @param {WebInspector.RemoteObject} object
+ */
+WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties = function(treeElement, object)
 {
-    parentTreeElement.removeChildren();
-    const bucketThreshold = WebInspector.ArrayGroupingTreeElement._bucketThreshold;
-    var range = toIndex - fromIndex;
+    object.callFunction(buildObjectFragment, undefined, processObjectFragment.bind(this));
 
-    function appendElement(i)
+    function buildObjectFragment()
     {
-        var treeElement = new treeElementConstructor(properties[i]);
-        treeElement._readOnly = true;
-        parentTreeElement.appendChild(treeElement);
+        var result = Object.create(this.__proto__);
+        var names = Object.getOwnPropertyNames(this);
+        for (var i = 0; i < names.length; ++i) {
+            var name = names[i];
+            if (!isNaN(name))
+                continue;
+            var descriptor = Object.getOwnPropertyDescriptor(this, name);
+            Object.defineProperty(result, name, descriptor);
+        }
+        return result;
     }
 
-    if (range <= bucketThreshold) {
-        for (var i = fromIndex; i < toIndex; ++i)
-            appendElement(i);
-        return;
+    function processObjectFragment(arrayFragment)
+    {
+        arrayFragment.getOwnProperties(processProperties.bind(this));
     }
 
-    var bucketSize = Math.ceil(range / bucketThreshold);
-    if (bucketSize < bucketThreshold)
-        bucketSize = Math.floor(Math.sqrt(range));
+    function processProperties(properties)
+    {
+        if (!properties)
+            return;
 
-    for (var i = fromIndex; i < toIndex; i += bucketSize) {
-        var to = Math.min(i + bucketSize, toIndex);
-        if (to - i > 1) {
-            var group = new WebInspector.ArrayGroupingTreeElement(treeElementConstructor, properties, i, to);
-            parentTreeElement.appendChild(group);
-        } else
-            appendElement(i);
+        properties.sort(WebInspector.ObjectPropertiesSection.CompareProperties);
+        for (var i = 0; i < properties.length; ++i) {
+            properties[i].parentObject = this._object;
+            var childTreeElement = new treeElement.treeOutline.section.treeElementConstructor(properties[i]);
+            childTreeElement._readOnly = true;
+            treeElement.appendChild(childTreeElement);
+        }
     }
 }
 
 WebInspector.ArrayGroupingTreeElement.prototype = {
     onpopulate: function()
     {
-        WebInspector.ArrayGroupingTreeElement._populate(this, this._treeElementConstructor, this._properties, this._fromIndex, this._toIndex);
+        if (this._populated)
+            return;
+        
+        this._populated = true;
+
+        if (this._propertyCount >= WebInspector.ArrayGroupingTreeElement._bucketThreshold) {
+            WebInspector.ArrayGroupingTreeElement._populateRanges(this, this._object, this._fromIndex, this._toIndex, false);
+            return;
+        }
+        WebInspector.ArrayGroupingTreeElement._populateAsFragment(this, this._object, this._fromIndex, this._toIndex);
+    },
+
+    onattach: function()
+    {
+        this.listItemElement.addStyleClass("name");
     }
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/PropertiesSidebarPane.js (109926 => 109927)


--- trunk/Source/WebCore/inspector/front-end/PropertiesSidebarPane.js	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/Source/WebCore/inspector/front-end/PropertiesSidebarPane.js	2012-03-06 17:17:13 UTC (rev 109927)
@@ -65,7 +65,7 @@
                 }
                 return result;
             }
-            object.callFunction(protoList, nodePrototypesReady.bind(this));
+            object.callFunction(protoList, undefined, nodePrototypesReady.bind(this));
             object.release();
         }
 

Modified: trunk/Source/WebCore/inspector/front-end/RemoteObject.js (109926 => 109927)


--- trunk/Source/WebCore/inspector/front-end/RemoteObject.js	2012-03-06 17:09:56 UTC (rev 109926)
+++ trunk/Source/WebCore/inspector/front-end/RemoteObject.js	2012-03-06 17:17:13 UTC (rev 109927)
@@ -272,30 +272,32 @@
 
     /**
      * @param {string} functionDeclaration
+     * @param {Array.<RuntimeAgent.CallArgument>} args
      * @param {function(?WebInspector.RemoteObject)} callback
      */
-    callFunction: function(functionDeclaration, callback)
+    callFunction: function(functionDeclaration, args, callback)
     {
         function mycallback(error, result, wasThrown)
         {
             callback((error || wasThrown) ? null : WebInspector.RemoteObject.fromPayload(result));
         }
 
-        RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), undefined, undefined, mycallback);
+        RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, undefined, mycallback);
     },
 
     /**
      * @param {string} functionDeclaration
+     * @param {Array.<RuntimeAgent.CallArgument>} args
      * @param {function(*)} callback
      */
-    callFunctionJSON: function(functionDeclaration, callback)
+    callFunctionJSON: function(functionDeclaration, args, callback)
     {
         function mycallback(error, result, wasThrown)
         {
             callback((error || wasThrown) ? null : result.value);
         }
 
-        RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), undefined, true, mycallback);
+        RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, mycallback);
     },
 
     release: function()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to