Currently, Number.toString always prints high-resolution values in KBs and MBs (e.g. 1.234MB). My intention is to allow it to print coarse-grained values (no digits after the decimal point.)
Created attachment 34450 [details] Proposed change
What is the reason for this addition?
I'm working on the heap profiling page for Chromium. I have one place where I'm displaying memory stats (as a subtitle for memory snapshot items), and there I don't need excessive precision provided by the default version of Number.bytesToString. That's why I decided to provide 'low-res' argument to it. You can check out the current look of the Heap page here: http://build.chromium.org/buildbot/continuous/mac/2009-08-10/22915/chrome-mac.zip As I'm planning to upstream it to WebKit some day, so let's discuss it. The current view is very simple, I have more functionality to add.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/utilities.js Committed r47095