Title: [86836] trunk
Revision
86836
Author
[email protected]
Date
2011-05-19 04:10:45 -0700 (Thu, 19 May 2011)

Log Message

2011-05-19  Pavel Feldman  <[email protected]>

        Reviewed by Yury Semikhatsky.

        Web Inspector: expose object class name as a part of RemoteObject mirror.
        https://bugs.webkit.org/show_bug.cgi?id=61067

        * inspector/InjectedScriptSource.js:
        * inspector/Inspector.json:

Modified Paths

Diff

Modified: trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt (86835 => 86836)


--- trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt	2011-05-19 11:09:24 UTC (rev 86835)
+++ trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt	2011-05-19 11:10:45 UTC (rev 86836)
@@ -21,6 +21,7 @@
             objectId : <string>
             hasChildren : true
             type : "object"
+            className : <string>
             description : "TestObject"
         }
     }
@@ -47,6 +48,7 @@
             objectId : <string>
             hasChildren : true
             type : "object"
+            className : <string>
             description : "TestObject"
         }
     }
@@ -156,6 +158,7 @@
                     objectId : <string>
                     hasChildren : true
                     type : "object"
+                    className : <string>
                     description : "TestObject"
                 }
             }

Modified: trunk/LayoutTests/inspector/protocol/runtime-agent.html (86835 => 86836)


--- trunk/LayoutTests/inspector/protocol/runtime-agent.html	2011-05-19 11:09:24 UTC (rev 86835)
+++ trunk/LayoutTests/inspector/protocol/runtime-agent.html	2011-05-19 11:10:45 UTC (rev 86836)
@@ -27,7 +27,7 @@
             ["RuntimeAgent", "releaseObject", result.objectId],
             ["RuntimeAgent", "releaseObjectGroup", 'test']];
 
-        InspectorTest.runProtocolTestSuite("RuntimeAgent", testSuite, ['id', 'requestId', 'objectId']);
+        InspectorTest.runProtocolTestSuite("RuntimeAgent", testSuite, ['id', 'requestId', 'objectId', 'className']);
     }
 
     RuntimeAgent.evaluate('window.testObject', 'test', false, callback);

Modified: trunk/Source/WebCore/ChangeLog (86835 => 86836)


--- trunk/Source/WebCore/ChangeLog	2011-05-19 11:09:24 UTC (rev 86835)
+++ trunk/Source/WebCore/ChangeLog	2011-05-19 11:10:45 UTC (rev 86836)
@@ -2,6 +2,16 @@
 
         Reviewed by Yury Semikhatsky.
 
+        Web Inspector: expose object class name as a part of RemoteObject mirror.
+        https://bugs.webkit.org/show_bug.cgi?id=61067
+
+        * inspector/InjectedScriptSource.js:
+        * inspector/Inspector.json:
+
+2011-05-19  Pavel Feldman  <[email protected]>
+
+        Reviewed by Yury Semikhatsky.
+
         Web Inspector: make "this" a part of callFrame, not scope in the protocol.
         https://bugs.webkit.org/show_bug.cgi?id=61057
 

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (86835 => 86836)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-05-19 11:09:24 UTC (rev 86835)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-05-19 11:10:45 UTC (rev 86836)
@@ -419,13 +419,15 @@
 
 var injectedScript = new InjectedScript();
 
-InjectedScript.RemoteObject = function(objectId, type, description, hasChildren)
+InjectedScript.RemoteObject = function(objectId, type, className, description, hasChildren)
 {
     if (objectId) {
         this.objectId = objectId;
         this.hasChildren = hasChildren;
     }
     this.type = type;
+    if (className)
+        this.className = className;
     this.description = description;
 }
 
@@ -436,7 +438,7 @@
     } catch (ex) {
         var description = "<failed to convert exception to string>";
     }
-    return new InjectedScript.RemoteObject(null, "string", "[ Exception: " + description + " ]");
+    return new InjectedScript.RemoteObject(null, "string", null, "[ Exception: " + description + " ]");
 }
 
 // This method may throw
@@ -445,9 +447,9 @@
     var type = injectedScript._type(object);
     var rawType = typeof object;
     var hasChildren = (rawType === "object" && object !== null && (!!Object.getOwnPropertyNames(object).length || !!object.__proto__)) || rawType === "function";
-    var description = "";
+    var className = InjectedScriptHost.internalConstructorName(object);
     var description = injectedScript._describe(object);
-    return new InjectedScript.RemoteObject(objectId, type, description, hasChildren);
+    return new InjectedScript.RemoteObject(objectId, type, className, description, hasChildren);
 }
 
 InjectedScript.CallFrameProxy = function(ordinal, callFrame)

Modified: trunk/Source/WebCore/inspector/Inspector.json (86835 => 86836)


--- trunk/Source/WebCore/inspector/Inspector.json	2011-05-19 11:09:24 UTC (rev 86835)
+++ trunk/Source/WebCore/inspector/Inspector.json	2011-05-19 11:10:45 UTC (rev 86836)
@@ -223,7 +223,8 @@
                     { "name": "description", "type": "string", "description": "String representation of the object." },
                     { "name": "hasChildren", "type": "boolean", "optional": true, "description": "True when this object can be queried for children." },
                     { "name": "objectId", "type": "string", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
-                    { "name": "type", "type": "string", "enum": ["object", "array", "function", "null", "node", "undefined", "string", "number", "boolean", "regexp", "date"], "description": "Object type." }
+                    { "name": "type", "type": "string", "enum": ["object", "array", "function", "null", "node", "undefined", "string", "number", "boolean", "regexp", "date"], "description": "Object type." },
+                    { "name": "className", "type": "string", "optional": true, "description": "Object class name." }
                 ]
             },
             {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to