[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
pfeldman at chromium.org
pfeldman at chromium.org
Fri Feb 26 22:24:52 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit eddc0e41b1eb87dcee878777dc348060475e3496
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 18 18:45:31 2010 +0000
2010-02-18 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Expand Object.__proto__ properly.
https://bugs.webkit.org/show_bug.cgi?id=35113
* inspector/front-end/EventListenersSidebarPane.js:
* inspector/front-end/InjectedScript.js:
(injectedScriptConstructor):
* inspector/front-end/ObjectProxy.js:
(WebInspector.ObjectProxy):
* inspector/front-end/PropertiesSidebarPane.js:
(WebInspector.PropertiesSidebarPane.prototype.update.callback):
* inspector/front-end/inspector.js:
(WebInspector.log.logMessage):
(WebInspector.log):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2fe9f61..c6fa286 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-02-18 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Expand Object.__proto__ properly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35113
+
+ * inspector/front-end/EventListenersSidebarPane.js:
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor):
+ * inspector/front-end/ObjectProxy.js:
+ (WebInspector.ObjectProxy):
+ * inspector/front-end/PropertiesSidebarPane.js:
+ (WebInspector.PropertiesSidebarPane.prototype.update.callback):
+ * inspector/front-end/inspector.js:
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
2010-02-18 Nate Chapin <japhet at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/inspector/front-end/EventListenersSidebarPane.js b/WebCore/inspector/front-end/EventListenersSidebarPane.js
index 649eea8..e454256 100644
--- a/WebCore/inspector/front-end/EventListenersSidebarPane.js
+++ b/WebCore/inspector/front-end/EventListenersSidebarPane.js
@@ -191,7 +191,7 @@ WebInspector.EventListenerBar.prototype = {
// Just build properties in place - no need to reach out for injected script.
var value = this.eventListener[propertyName];
if (value instanceof WebInspector.DOMNode)
- value = new WebInspector.ObjectProxy(value.injectedScriptId, value.id, [], 0, appropriateSelectorForNode(value), true);
+ value = new WebInspector.ObjectProxy(value.injectedScriptId, value.id, [], appropriateSelectorForNode(value), true);
else
value = WebInspector.ObjectProxy.wrapPrimitiveValue(value);
properties.push(new WebInspector.ObjectPropertyProxy(propertyName, value));
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index f248b91..96c6428 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -485,7 +485,6 @@ InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty, abbre
var object = InjectedScript._resolveObject(objectProxy);
if (!InjectedScript._isDefined(object))
return false;
-
var properties = [];
var propertyNames = ignoreHasOwnProperty ? InjectedScript._getPropertyNames(object) : Object.getOwnPropertyNames(object);
if (!ignoreHasOwnProperty && object.__proto__)
@@ -505,7 +504,6 @@ InjectedScript.getProperties = function(objectProxy, ignoreHasOwnProperty, abbre
var childObjectProxy = new InjectedScript.createProxyObject(childObject, objectProxy.objectId, abbreviate);
childObjectProxy.path = objectProxy.path ? objectProxy.path.slice() : [];
childObjectProxy.path.push(propertyName);
- childObjectProxy.protoDepth = objectProxy.protoDepth || 0;
property.value = childObjectProxy;
} catch(e) {
property.value = { description: e.toString() };
@@ -1087,10 +1085,6 @@ InjectedScript._resolveObject = function(objectProxy)
for (var i = 0; InjectedScript._isDefined(object) && path && i < path.length; ++i)
object = object[path[i]];
- // Get to the necessary proto layer.
- for (var i = 0; InjectedScript._isDefined(object) && protoDepth && i < protoDepth; ++i)
- object = object.__proto__;
-
return object;
}
@@ -1154,12 +1148,7 @@ InjectedScript.createProxyObject = function(object, objectId, abbreviate)
result.propertyLength = object.length;
var type = typeof object;
- if ((type === "object" && object !== null) || type === "function") {
- for (var subPropertyName in object) {
- result.hasChildren = true;
- break;
- }
- }
+ result.hasChildren = (type === "object" && object !== null && Object.getOwnPropertyNames(object).length) || type === "function";
try {
result.description = InjectedScript._describe(object, abbreviate);
} catch (e) {
diff --git a/WebCore/inspector/front-end/ObjectProxy.js b/WebCore/inspector/front-end/ObjectProxy.js
index 62517b8..ef139c6 100644
--- a/WebCore/inspector/front-end/ObjectProxy.js
+++ b/WebCore/inspector/front-end/ObjectProxy.js
@@ -28,12 +28,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-WebInspector.ObjectProxy = function(injectedScriptId, objectId, path, protoDepth, description, hasChildren)
+WebInspector.ObjectProxy = function(injectedScriptId, objectId, path, description, hasChildren)
{
this.objectId = objectId;
this.injectedScriptId = injectedScriptId;
this.path = path || [];
- this.protoDepth = protoDepth || 0;
this.description = description;
this.hasChildren = hasChildren;
}
diff --git a/WebCore/inspector/front-end/PropertiesSidebarPane.js b/WebCore/inspector/front-end/PropertiesSidebarPane.js
index 857d9a7..9df6448 100644
--- a/WebCore/inspector/front-end/PropertiesSidebarPane.js
+++ b/WebCore/inspector/front-end/PropertiesSidebarPane.js
@@ -48,12 +48,14 @@ WebInspector.PropertiesSidebarPane.prototype = {
body.removeChildren();
self.sections = [];
+ var path = [];
// Get array of prototype user-friendly names.
for (var i = 0; i < prototypes.length; ++i) {
- var prototype = new WebInspector.ObjectProxy(node.injectedScriptId, node.id, [], i);
+ var prototype = new WebInspector.ObjectProxy(node.injectedScriptId, node.id, path.slice());
var section = new WebInspector.ObjectPropertiesSection(prototype, prototypes[i], WebInspector.UIString("Prototype"));
self.sections.push(section);
body.appendChild(section.element);
+ path.push("__proto__");
}
};
InjectedScriptAccess.get(node.injectedScriptId).getPrototypes(node.id, callback);
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 354bf21..8bcdf63 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -1342,7 +1342,7 @@ WebInspector.log = function(message)
WebInspector.log.repeatCount = repeatCount;
// ConsoleMessage expects a proxy object
- message = new WebInspector.ObjectProxy(null, null, [], 0, message, false);
+ message = new WebInspector.ObjectProxy(null, null, [], message, false);
// post the message
var msg = new WebInspector.ConsoleMessage(
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list