[webkit-reviews] review granted: [Bug 112862] IndexedDB: Histogram available disk space on attempt to open database : [Attachment 194160] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 21 13:25:53 PDT 2013


Adam Barth <abarth at webkit.org> has granted David Grogan
<dgrogan at chromium.org>'s request for review:
Bug 112862: IndexedDB: Histogram available disk space on attempt to open
database
https://bugs.webkit.org/show_bug.cgi?id=112862

Attachment 194160: Patch
https://bugs.webkit.org/attachment.cgi?id=194160&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=194160&action=review


> Source/WebCore/platform/leveldb/LevelDBDatabase.cpp:146
> +static void HistogramFreeSpace(const char* type, String fileName)

HistogramFreeSpace -> histogramFreeSpace

> Source/WebCore/platform/leveldb/LevelDBDatabase.cpp:149
> +    String name =
String::format("WebCore.IndexedDB.LevelDB.Open%sFreeDiskSpace", type);

You should just use operator+ on String.  It's faster.

> Source/WebCore/platform/leveldb/LevelDBDatabase.cpp:156
> +    HistogramSupport::histogramCustomCounts(name.utf8().data(),
clampedDiskSpaceKBytes, 1, 1e9, 11);

Should we COMPILE_ASSERT a relationship between 1e9 and INT_MAX?


More information about the webkit-reviews mailing list