RESOLVED FIXED Bug 28666
Inspector: REGRESSION Formatting Function in Console is Abbreviated Too Often
https://bugs.webkit.org/show_bug.cgi?id=28666
Summary Inspector: REGRESSION Formatting Function in Console is Abbreviated Too Often
Joseph Pecoraro
Reported 2009-08-23 00:25:17 PDT
Current Behavior: > Math.sin function sin() { > var o = { a: Math.sin } undefined > o Object a: function sin() { > o.a function sin() { Expected Behavior: (From Safari 4.0.3) > Math.sin function sin() { [native code] } > var o = { a: Math.sin } undefined > o Object a: function sin() { > o.a function sin() { [native code] } The current behavior abbreviates too often (in fact all the time). Specifically when setting the "description" in InjectedScript.createProxyObject. Changing the Object.describe() call inside createProxyObject makes all of the examples above the unabbreviated style. Should abbreviation move out of Object.describe() and instead be used right before showing in the UI?
Attachments
patch (2.23 KB, patch)
2009-08-23 02:41 PDT, Pavel Feldman
timothy: review+
Pavel Feldman
Comment 1 2009-08-23 02:18:51 PDT
(In reply to comment #0) > The current behavior abbreviates too often (in fact all the time). > Specifically when setting the "description" in > InjectedScript.createProxyObject. Changing the Object.describe() call inside > createProxyObject makes all of the examples above the unabbreviated style. > Should abbreviation move out of Object.describe() and instead be used right > before showing in the UI? Thanks for reporting this. Passing information from the InjectedScript to the UI is going to be slow, especially after we add the JSON serialization there. So we don't want to push information that might not be needed for the UI. I think I just need to find the place where it got regressed and do no abbreviation there. Or do you want to investigate it?
Pavel Feldman
Comment 2 2009-08-23 02:41:02 PDT
Joseph Pecoraro
Comment 3 2009-08-23 07:48:44 PDT
This is the exact idea I thought of after I left this last night. Short and sweet.
Pavel Feldman
Comment 4 2009-08-23 12:51:14 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/InjectedScript.js Committed r47695
Note You need to log in before you can comment on or make changes to this bug.