Title: [146561] trunk/Source
Revision
146561
Author
[email protected]
Date
2013-03-21 21:58:15 -0700 (Thu, 21 Mar 2013)

Log Message

Unreviewed, rolling out r146560.
http://trac.webkit.org/changeset/146560
https://bugs.webkit.org/show_bug.cgi?id=112862

invalid parameter to histogram

Source/Platform:

* chromium/public/Platform.h:

Source/WebCore:

* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::open):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (146560 => 146561)


--- trunk/Source/Platform/ChangeLog	2013-03-22 04:03:27 UTC (rev 146560)
+++ trunk/Source/Platform/ChangeLog	2013-03-22 04:58:15 UTC (rev 146561)
@@ -1,5 +1,15 @@
 2013-03-21  David Grogan  <[email protected]>
 
+        Unreviewed, rolling out r146560.
+        http://trac.webkit.org/changeset/146560
+        https://bugs.webkit.org/show_bug.cgi?id=112862
+
+        invalid parameter to histogram
+
+        * chromium/public/Platform.h:
+
+2013-03-21  David Grogan  <[email protected]>
+
         IndexedDB: Histogram available disk space on attempt to open database
         https://bugs.webkit.org/show_bug.cgi?id=112862
 

Modified: trunk/Source/Platform/chromium/public/Platform.h (146560 => 146561)


--- trunk/Source/Platform/chromium/public/Platform.h	2013-03-22 04:03:27 UTC (rev 146560)
+++ trunk/Source/Platform/chromium/public/Platform.h	2013-03-22 04:58:15 UTC (rev 146561)
@@ -359,10 +359,7 @@
     // Callable from a background WebKit thread.
     virtual void callOnMainThread(void (*func)(void*), void* context) { }
 
-    // Checks the partition/volume where fileName resides.
-    virtual long long availableDiskSpaceInBytes(const WebString& fileName) { return 0; }
 
-
     // Testing -------------------------------------------------------------
 
 #define HAVE_WEBUNITTESTSUPPORT 1

Modified: trunk/Source/WebCore/ChangeLog (146560 => 146561)


--- trunk/Source/WebCore/ChangeLog	2013-03-22 04:03:27 UTC (rev 146560)
+++ trunk/Source/WebCore/ChangeLog	2013-03-22 04:58:15 UTC (rev 146561)
@@ -1,5 +1,16 @@
 2013-03-21  David Grogan  <[email protected]>
 
+        Unreviewed, rolling out r146560.
+        http://trac.webkit.org/changeset/146560
+        https://bugs.webkit.org/show_bug.cgi?id=112862
+
+        invalid parameter to histogram
+
+        * platform/leveldb/LevelDBDatabase.cpp:
+        (WebCore::LevelDBDatabase::open):
+
+2013-03-21  David Grogan  <[email protected]>
+
         IndexedDB: Histogram available disk space on attempt to open database
         https://bugs.webkit.org/show_bug.cgi?id=112862
 

Modified: trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp (146560 => 146561)


--- trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp	2013-03-22 04:03:27 UTC (rev 146560)
+++ trunk/Source/WebCore/platform/leveldb/LevelDBDatabase.cpp	2013-03-22 04:58:15 UTC (rev 146561)
@@ -46,7 +46,6 @@
 
 #if PLATFORM(CHROMIUM)
 #include <env_idb.h>
-#include <public/Platform.h>
 #endif
 
 #if !PLATFORM(CHROMIUM)
@@ -143,22 +142,6 @@
     return s.ok();
 }
 
-static void histogramFreeSpace(const char* type, String fileName)
-{
-#if PLATFORM(CHROMIUM)
-    String name = "WebCore.IndexedDB.LevelDB.Open" + String(type) + "FreeDiskSpace";
-    long long freeDiskSpaceInKBytes = WebKit::Platform::current()->availableDiskSpaceInBytes(fileName) / 1024;
-    if (freeDiskSpaceInKBytes < 0) {
-        HistogramSupport::histogramEnumeration("WebCore.IndexedDB.LevelDB.FreeDiskSpaceFailure", 1, 1);
-        return;
-    }
-    int clampedDiskSpaceKBytes = freeDiskSpaceInKBytes > INT_MAX ? INT_MAX : freeDiskSpaceInKBytes;
-    const uint64_t histogramMax = static_cast<uint64_t>(1e9);
-    COMPILE_ASSERT(histogramMax <= INT_MAX, histogramMaxTooBig);
-    HistogramSupport::histogramCustomCounts(name.utf8().data(), clampedDiskSpaceKBytes, 1, histogramMax, 11/*buckets*/);
-#endif
-}
-
 PassOwnPtr<LevelDBDatabase> LevelDBDatabase::open(const String& fileName, const LevelDBComparator* comparator)
 {
     OwnPtr<ComparatorAdapter> comparatorAdapter = adoptPtr(new ComparatorAdapter(comparator));
@@ -183,14 +166,10 @@
             levelDBError = LevelDBIOError;
         HistogramSupport::histogramEnumeration("WebCore.IndexedDB.LevelDBOpenErrors", levelDBError, LevelDBMaxError);
 
-        histogramFreeSpace("Failure", fileName);
-
         LOG_ERROR("Failed to open LevelDB database from %s: %s", fileName.ascii().data(), s.ToString().c_str());
         return nullptr;
     }
 
-    histogramFreeSpace("Success", fileName);
-
     OwnPtr<LevelDBDatabase> result = adoptPtr(new LevelDBDatabase);
     result->m_db = adoptPtr(db);
     result->m_comparatorAdapter = comparatorAdapter.release();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to