Title: [128797] trunk/Source/WebCore
- Revision
- 128797
- Author
- [email protected]
- Date
- 2012-09-17 13:12:46 -0700 (Mon, 17 Sep 2012)
Log Message
Measure usage of the legacy WebKitBlobBuilder API in the hopes of being able to remove it
https://bugs.webkit.org/show_bug.cgi?id=96939
Reviewed by Ojan Vafai.
In the course of standardization, the BlobBuilder API was removed in
favor of just using the Blob constructor. This patch adds some
measurement to see how often this legacy API is used. If the API is not
used very much, we might be able to remove it.
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::WebKitBlobBuilder::create):
* page/FeatureObserver.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (128796 => 128797)
--- trunk/Source/WebCore/ChangeLog 2012-09-17 20:07:11 UTC (rev 128796)
+++ trunk/Source/WebCore/ChangeLog 2012-09-17 20:12:46 UTC (rev 128797)
@@ -1,3 +1,19 @@
+2012-09-17 Adam Barth <[email protected]>
+
+ Measure usage of the legacy WebKitBlobBuilder API in the hopes of being able to remove it
+ https://bugs.webkit.org/show_bug.cgi?id=96939
+
+ Reviewed by Ojan Vafai.
+
+ In the course of standardization, the BlobBuilder API was removed in
+ favor of just using the Blob constructor. This patch adds some
+ measurement to see how often this legacy API is used. If the API is not
+ used very much, we might be able to remove it.
+
+ * fileapi/WebKitBlobBuilder.cpp:
+ (WebCore::WebKitBlobBuilder::create):
+ * page/FeatureObserver.h:
+
2012-09-17 Joshua Bell <[email protected]>
IndexedDB: Result of IDBFactory.deleteDatabase() should be undefined, not null
Modified: trunk/Source/WebCore/fileapi/WebKitBlobBuilder.cpp (128796 => 128797)
--- trunk/Source/WebCore/fileapi/WebKitBlobBuilder.cpp 2012-09-17 20:07:11 UTC (rev 128796)
+++ trunk/Source/WebCore/fileapi/WebKitBlobBuilder.cpp 2012-09-17 20:12:46 UTC (rev 128797)
@@ -33,7 +33,9 @@
#include "WebKitBlobBuilder.h"
#include "Blob.h"
+#include "Document.h"
#include "ExceptionCode.h"
+#include "FeatureObserver.h"
#include "File.h"
#include "HistogramSupport.h"
#include "LineEnding.h"
@@ -61,6 +63,11 @@
String message("BlobBuilder is deprecated. Use \"Blob\" constructor instead.");
context->addConsoleMessage(JSMessageSource, LogMessageType, WarningMessageLevel, message);
+ if (context->isDocument()) {
+ Document* document = static_cast<Document*>(context);
+ FeatureObserver::observe(document->domWindow(), FeatureObserver::LegacyBlobBuilder);
+ }
+
return adoptRef(new WebKitBlobBuilder());
}
Modified: trunk/Source/WebCore/page/FeatureObserver.h (128796 => 128797)
--- trunk/Source/WebCore/page/FeatureObserver.h 2012-09-17 20:07:11 UTC (rev 128796)
+++ trunk/Source/WebCore/page/FeatureObserver.h 2012-09-17 20:12:46 UTC (rev 128797)
@@ -41,6 +41,7 @@
enum Feature {
PageDestruction,
LegacyNotifications,
+ LegacyBlobBuilder,
// Add new features above this line.
NumberOfFeatures, // This enum value must be last.
};
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes