Bug 1271457 - Add use counters for non-standard IDB extensions. r=janv, r=qDot
authorAndrew Overholt <overholt@mozilla.com>
Tue, 07 Feb 2017 19:57:00 -0500
changeset 374153 52f57ab9685b7cbcefae349ff305d899f884a223
parent 374152 f9a4f73f014b633224ca4f48b7a75a1304b9ba02
child 374154 1bc4a653e92ef65cfd84e508f0d5227d54d9046e
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv, qDot
bugs1271457
milestone54.0a1
Bug 1271457 - Add use counters for non-standard IDB extensions. r=janv, r=qDot
dom/base/UseCounters.conf
dom/webidl/IDBDatabase.webidl
dom/webidl/IDBMutableFile.webidl
--- a/dom/base/UseCounters.conf
+++ b/dom/base/UseCounters.conf
@@ -57,16 +57,22 @@ attribute OfflineResourceList.onchecking
 attribute OfflineResourceList.onerror
 attribute OfflineResourceList.onnoupdate
 attribute OfflineResourceList.ondownloading
 attribute OfflineResourceList.onprogress
 attribute OfflineResourceList.onupdateready
 attribute OfflineResourceList.oncached
 attribute OfflineResourceList.onobsolete
 
+// Non-standard IndexedDB API
+method IDBDatabase.createMutableFile
+method IDBDatabase.mozCreateFileHandle
+method IDBMutableFile.open
+method IDBMutableFile.getFile
+
 // DataTransfer API (gecko-only methods)
 method DataTransfer.addElement
 attribute DataTransfer.mozItemCount
 attribute DataTransfer.mozCursor
 method DataTransfer.mozTypesAt
 method DataTransfer.mozClearDataAt
 method DataTransfer.mozSetDataAt
 method DataTransfer.mozGetDataAt
--- a/dom/webidl/IDBDatabase.webidl
+++ b/dom/webidl/IDBDatabase.webidl
@@ -34,15 +34,15 @@ interface IDBDatabase : EventTarget {
                 attribute EventHandler       onerror;
                 attribute EventHandler       onversionchange;
 };
 
 partial interface IDBDatabase {
     [Func="mozilla::dom::IndexedDatabaseManager::ExperimentalFeaturesEnabled"]
     readonly    attribute StorageType        storage;
 
-    [Exposed=Window, Throws]
+    [Exposed=Window, Throws, UseCounter]
     IDBRequest createMutableFile (DOMString name, optional DOMString type);
 
     // this is deprecated due to renaming in the spec
-    [Exposed=Window, Throws]
+    [Exposed=Window, Throws, UseCounter]
     IDBRequest mozCreateFileHandle (DOMString name, optional DOMString type); // now createMutableFile
 };
--- a/dom/webidl/IDBMutableFile.webidl
+++ b/dom/webidl/IDBMutableFile.webidl
@@ -5,17 +5,17 @@
 
 [Exposed=(Window,System)]
 interface IDBMutableFile : EventTarget {
   readonly attribute DOMString name;
   readonly attribute DOMString type;
 
   readonly attribute IDBDatabase database;
 
-  [Throws]
+  [Throws, UseCounter]
   IDBFileHandle open(optional FileMode mode = "readonly");
 
-  [Throws]
+  [Throws, UseCounter]
   DOMRequest getFile();
 
   attribute EventHandler onabort;
   attribute EventHandler onerror;
 };