Diff
Modified: trunk/LayoutTests/ChangeLog (93036 => 93037)
--- trunk/LayoutTests/ChangeLog 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/LayoutTests/ChangeLog 2011-08-15 10:26:49 UTC (rev 93037)
@@ -1,3 +1,16 @@
+2011-08-15 Pavel Feldman <[email protected]>
+
+ Web Inspector: not all of the properties have valid descriptors on all platforms.
+ Includes PropertyDescriptor protocol documentation fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=66215
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/protocol/runtime-agent-expected.txt:
+ * inspector/protocol/runtime-agent.html:
+ * inspector/runtime/runtime-localStorage-getProperties-expected.txt: Added.
+ * inspector/runtime/runtime-localStorage-getProperties.html: Added.
+
2011-08-14 Renata Hodovan <[email protected]>
[QT]REGRESSION after r93011
Modified: trunk/LayoutTests/inspector/debugger/debugger-expand-scope-expected.txt (93036 => 93037)
--- trunk/LayoutTests/inspector/debugger/debugger-expand-scope-expected.txt 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/LayoutTests/inspector/debugger/debugger-expand-scope-expected.txt 2011-08-15 10:26:49 UTC (rev 93037)
@@ -12,7 +12,7 @@
this: DOMWindow
x: 2010
DOMWindowWith Block
- No Properties
+ innerFunction: function innerFunction(x) {
Closure
arguments: Arguments[1]
makeClosureLocalVar: "local.TextParam"
Modified: trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt (93036 => 93037)
--- trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt 2011-08-15 10:26:49 UTC (rev 93037)
@@ -160,14 +160,14 @@
}
-----------------------------------------------------------
-RuntimeAgent.getProperties(<string>,false)
+RuntimeAgent.getProperties(<string>,true)
request:
{
method : "Runtime.getProperties"
params : {
objectId : <string>
- ownProperties : false
+ ownProperties : true
}
id : <number>
}
@@ -198,6 +198,18 @@
configurable : true
name : "self"
}
+ {
+ name : "__proto__"
+ value : {
+ type : "object"
+ objectId : <string>
+ className : <string>
+ description : "TestObject"
+ }
+ writable : true
+ configurable : true
+ enumerable : false
+ }
]
}
id : <number>
Modified: trunk/LayoutTests/inspector/protocol/runtime-agent.html (93036 => 93037)
--- trunk/LayoutTests/inspector/protocol/runtime-agent.html 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/LayoutTests/inspector/protocol/runtime-agent.html 2011-08-15 10:26:49 UTC (rev 93037)
@@ -26,7 +26,7 @@
["RuntimeAgent", "evaluate", 'var x = {}; x.self = x; x', 'test', false, true, undefined, true],
["RuntimeAgent", "callFunctionOn", result.objectId, 'function() { this.self = this; return this; }', undefined, true],
- ["RuntimeAgent", "getProperties", result.objectId, false],
+ ["RuntimeAgent", "getProperties", result.objectId, true],
["RuntimeAgent", "releaseObject", result.objectId],
["RuntimeAgent", "releaseObjectGroup", 'test']];
Added: trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties-expected.txt (0 => 93037)
--- trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties-expected.txt 2011-08-15 10:26:49 UTC (rev 93037)
@@ -0,0 +1,12 @@
+Tests RemoteObject.getProperties on localStorage object. 66215
+
+{
+ name : "testProperty"
+ value : {
+ type : "string"
+ description : "testPropertyValue"
+ }
+ enumerable : false
+ writable : false
+}
+
Property changes on: trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties.html (0 => 93037)
--- trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties.html (rev 0)
+++ trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties.html 2011-08-15 10:26:49 UTC (rev 93037)
@@ -0,0 +1,40 @@
+<html>
+<head>
+<script src=""
+<script>
+
+localStorage.testProperty = "testPropertyValue";
+
+function test()
+{
+ RuntimeAgent.evaluate("localStorage", step1);
+
+ function step1(error, result, wasThrown)
+ {
+ var localStorageHandle = WebInspector.RemoteObject.fromPayload(result);
+ localStorageHandle.getOwnProperties(step2);
+ }
+
+ function step2(properties)
+ {
+ for (var i = 0; i < properties.length; ++i) {
+ var property = properties[i];
+ if (property.name !== "testProperty")
+ continue;
+ property.value = { type: property.value.type, description: property.value.description };
+ InspectorTest.dump(property);
+ }
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+Tests RemoteObject.getProperties on localStorage object. <a href=""
+</p>
+
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/runtime/runtime-localStorage-getProperties.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (93036 => 93037)
--- trunk/Source/WebCore/ChangeLog 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/Source/WebCore/ChangeLog 2011-08-15 10:26:49 UTC (rev 93037)
@@ -1,5 +1,20 @@
2011-08-15 Pavel Feldman <[email protected]>
+ Web Inspector: not all of the properties have valid descriptors on all platforms.
+ Includes PropertyDescriptor protocol documentation fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=66215
+
+ Activations, LocalStorage and some other properties potentially don't have
+ valid property descriptors. InjectedScript should use conservative getter in order to
+ mitigate this.
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/InjectedScriptSource.js:
+ * inspector/Inspector.json:
+
+2011-08-15 Pavel Feldman <[email protected]>
+
Web Inspector: context menu on the link in the console does not have standard link options.
https://bugs.webkit.org/show_bug.cgi?id=66214
Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (93036 => 93037)
--- trunk/Source/WebCore/inspector/InjectedScriptSource.js 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js 2011-08-15 10:26:49 UTC (rev 93037)
@@ -221,8 +221,15 @@
try {
nameProcessed[name] = true;
var descriptor = Object.getOwnPropertyDescriptor(object, name);
- if (!descriptor)
+ if (!descriptor) {
+ // Not all bindings provide proper descriptors. Fall back to the writable, configurable property.
+ try {
+ descriptors.push({ name: name, value: object[name], writable: false, configurable: false, enumerable: false});
+ } catch (e) {
+ // Silent catch.
+ }
continue;
+ }
} catch (e) {
var descriptor = {};
descriptor.value = e;
Modified: trunk/Source/WebCore/inspector/Inspector.json (93036 => 93037)
--- trunk/Source/WebCore/inspector/Inspector.json 2011-08-15 10:00:58 UTC (rev 93036)
+++ trunk/Source/WebCore/inspector/Inspector.json 2011-08-15 10:26:49 UTC (rev 93037)
@@ -240,10 +240,11 @@
"type": "object",
"description": "Object property descriptor.",
"properties": [
+ { "name": "name", "type": "string", "description": "Property name." },
{ "name": "value", "$ref": "RemoteObject", "description": "The value associated with the property." },
{ "name": "writable", "type": "boolean", "description": "True iff the value associated with the property may be changed (data descriptors only)." },
- { "name": "get", "$ref": "RemoteObject", "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
- { "name": "set", "$ref": "RemoteObject", "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
+ { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
+ { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
{ "name": "configurable", "type": "boolean", "description": "True iff the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
{ "name": "enumerable", "type": "boolean", "description": "True iff this property shows up during enumeration of the properties on the corresponding object." }
]