Bug 1271457 - Add use counters for non-standard IDB extensions. r=janv, r=qDot
--- 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;
};