Changeset 86836 in webkit


Ignore:
Timestamp:
May 19, 2011 4:10:45 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

2011-05-19 Pavel Feldman <pfeldman@google.com>

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:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/inspector/protocol/runtime-agent-expected.txt

    r83583 r86836  
    2222            hasChildren : true
    2323            type : "object"
     24            className : <string>
    2425            description : "TestObject"
    2526        }
     
    4849            hasChildren : true
    4950            type : "object"
     51            className : <string>
    5052            description : "TestObject"
    5153        }
     
    157159                    hasChildren : true
    158160                    type : "object"
     161                    className : <string>
    159162                    description : "TestObject"
    160163                }
  • trunk/LayoutTests/inspector/protocol/runtime-agent.html

    r82804 r86836  
    2828            ["RuntimeAgent", "releaseObjectGroup", 'test']];
    2929
    30         InspectorTest.runProtocolTestSuite("RuntimeAgent", testSuite, ['id', 'requestId', 'objectId']);
     30        InspectorTest.runProtocolTestSuite("RuntimeAgent", testSuite, ['id', 'requestId', 'objectId', 'className']);
    3131    }
    3232
  • trunk/Source/WebCore/ChangeLog

    r86835 r86836  
     12011-05-19  Pavel Feldman  <pfeldman@google.com>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: expose object class name as a part of RemoteObject mirror.
     6        https://bugs.webkit.org/show_bug.cgi?id=61067
     7
     8        * inspector/InjectedScriptSource.js:
     9        * inspector/Inspector.json:
     10
    1112011-05-19  Pavel Feldman  <pfeldman@google.com>
    212
  • trunk/Source/WebCore/inspector/InjectedScriptSource.js

    r86835 r86836  
    420420var injectedScript = new InjectedScript();
    421421
    422 InjectedScript.RemoteObject = function(objectId, type, description, hasChildren)
     422InjectedScript.RemoteObject = function(objectId, type, className, description, hasChildren)
    423423{
    424424    if (objectId) {
     
    427427    }
    428428    this.type = type;
     429    if (className)
     430        this.className = className;
    429431    this.description = description;
    430432}
     
    437439        var description = "<failed to convert exception to string>";
    438440    }
    439     return new InjectedScript.RemoteObject(null, "string", "[ Exception: " + description + " ]");
     441    return new InjectedScript.RemoteObject(null, "string", null, "[ Exception: " + description + " ]");
    440442}
    441443
     
    446448    var rawType = typeof object;
    447449    var hasChildren = (rawType === "object" && object !== null && (!!Object.getOwnPropertyNames(object).length || !!object.__proto__)) || rawType === "function";
    448     var description = "";
     450    var className = InjectedScriptHost.internalConstructorName(object);
    449451    var description = injectedScript._describe(object);
    450     return new InjectedScript.RemoteObject(objectId, type, description, hasChildren);
     452    return new InjectedScript.RemoteObject(objectId, type, className, description, hasChildren);
    451453}
    452454
  • trunk/Source/WebCore/inspector/Inspector.json

    r86835 r86836  
    224224                    { "name": "hasChildren", "type": "boolean", "optional": true, "description": "True when this object can be queried for children." },
    225225                    { "name": "objectId", "type": "string", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
    226                     { "name": "type", "type": "string", "enum": ["object", "array", "function", "null", "node", "undefined", "string", "number", "boolean", "regexp", "date"], "description": "Object type." }
     226                    { "name": "type", "type": "string", "enum": ["object", "array", "function", "null", "node", "undefined", "string", "number", "boolean", "regexp", "date"], "description": "Object type." },
     227                    { "name": "className", "type": "string", "optional": true, "description": "Object class name." }
    227228                ]
    228229            },
Note: See TracChangeset for help on using the changeset viewer.