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?
(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?
Created attachment 38451 [details] patch
This is the exact idea I thought of after I left this last night. Short and sweet.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/InjectedScript.js Committed r47695