Web Inspector: Expanding event objects in console shows undefined for most values...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jan 2015 00:34:57 +0000 (00:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jan 2015 00:34:57 +0000 (00:34 +0000)
commit2d9e5c4b09ce5b545a4f6cf6f67dc84ae20a8a14
treea20a7147d3ff7dc619c4f21bbc8d5fdf0646e5a8
parenta9e43ece1c2e1a407f965cbb06de4c08377cd464
Web Inspector: Expanding event objects in console shows undefined for most values, it should have real values
https://bugs.webkit.org/show_bug.cgi?id=137306

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-20
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Provide another optional parameter to getProperties, to gather a list
of all own and getter properties.

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::getProperties):
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getProperties):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json:

Source/WebInspectorUI:

When first expanding an object, show all the object's own properties and any
getter properties that may be on its prototype chain. Now, we only fetch
own properties, for __proto__ properties.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.getOwnProperties):
(WebInspector.RemoteObject.prototype.getOwnAndGetterProperties):
(WebInspector.RemoteObject.prototype.getAllProperties):
(WebInspector.RemoteObject.prototype.get hasChildren): Deleted.
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection):
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt: Added.
* inspector/model/remote-object-get-properties.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/model/remote-object-get-properties-expected.txt [new file with mode: 0644]
LayoutTests/inspector/model/remote-object-get-properties.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScript.cpp
Source/JavaScriptCore/inspector/InjectedScript.h
Source/JavaScriptCore/inspector/InjectedScriptSource.js
Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
Source/JavaScriptCore/inspector/protocol/Runtime.json
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
Source/WebInspectorUI/UserInterface/Views/ObjectPropertiesSection.js