| Index: webkit/glue/devtools/js/devtools.js
|
| ===================================================================
|
| --- webkit/glue/devtools/js/devtools.js (revision 20134)
|
| +++ webkit/glue/devtools/js/devtools.js (working copy)
|
| @@ -562,20 +562,6 @@
|
|
|
|
|
| /**
|
| - * Dummy object used during properties inspection.
|
| - * @see WebInspector.didGetNodePropertiesAsync_
|
| - */
|
| -WebInspector.dummyObject_ = { 'foo' : 'bar' };
|
| -
|
| -
|
| -/**
|
| - * Dummy function used during properties inspection.
|
| - * @see WebInspector.didGetNodePropertiesAsync_
|
| - */
|
| -WebInspector.dummyFunction_ = function() {};
|
| -
|
| -
|
| -/**
|
| * Callback function used with the getNodeProperties.
|
| */
|
| WebInspector.didGetNodePropertiesAsync_ = function(treeOutline, constructor,
|
| @@ -585,23 +571,20 @@
|
| var obj = {};
|
| obj.devtools$$nodeId_ = nodeId;
|
| obj.devtools$$path_ = path;
|
| - for (var i = 0; i < props.length; i += 3) {
|
| + for (var i = 0; i < props.length; i += 4) {
|
| var type = props[i];
|
| var name = props[i + 1];
|
| var value = props[i + 2];
|
| + var className = props[i + 3];
|
| properties.push(name);
|
| - if (type == 'object') {
|
| + if (type == 'object' || type == 'function') {
|
| // fake object is going to be replaced on expand.
|
| - obj[name] = WebInspector.dummyObject_;
|
| - } else if (type == 'function') {
|
| - // fake function is going to be replaced on expand.
|
| - obj[name] = WebInspector.dummyFunction_;
|
| + obj[name] = new WebInspector.UnresolvedPropertyValue(type, className);
|
| } else {
|
| obj[name] = value;
|
| }
|
| }
|
| properties.sort();
|
| -
|
| treeOutline.removeChildren();
|
|
|
| for (var i = 0; i < properties.length; ++i) {
|
| @@ -612,6 +595,17 @@
|
|
|
|
|
| /**
|
| + * @param {string} type Type of the the property value('object' or 'function').
|
| + * @param {string} className Class name of the property value.
|
| + * @constructor
|
| + */
|
| +WebInspector.UnresolvedPropertyValue = function(type, className) {
|
| + this.type = type;
|
| + this.className = className;
|
| +};
|
| +
|
| +
|
| +/**
|
| * Replace WebKit method with our own implementation to use our call stack
|
| * representation. Original method uses Object.prototype.toString.call to
|
| * learn if scope object is a JSActivation which doesn't work in Chrome.
|
| @@ -987,6 +981,10 @@
|
| (function OverrideObjectDescribe() {
|
| var oldDescribe = Object.describe;
|
| Object.describe = function(obj, abbreviated) {
|
| + if (obj instanceof WebInspector.UnresolvedPropertyValue) {
|
| + return obj.className;
|
| + }
|
| +
|
| var result = oldDescribe.call(Object, obj, abbreviated);
|
| if (result == 'Object' && obj.className) {
|
| return obj.className;
|
|
|