// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // This file defines a list of use counters, which are things that can // record usage of Web platform features and then report this information // through Telemetry. // // The format of this file is very strict. Each line can be: // // (a) a blank line // // (b) a comment, which is a line that begins with "//" // // (c) one of three possible use counter declarations: // // method . // attribute . // custom // // The for custom counters will be appended to "Whether a document " // or "Whether a page ", so phrase it appropriately. For instance, "constructs a // Foo object" or "calls Document.bar('some value')". It may contain any // character (including whitespace). // // To actually cause use counters to be incremented, DOM methods // and attributes must have a [UseCounter] extended attribute in // the Web IDL file. // // Custom counters are incremented when // SetUseCounter(eUseCounter_custom_MyName) is called on a Document object. // // You might reasonably ask why we have this file and we require // annotating things with [UseCounter] in the relevant WebIDL file as // well. Generating things from bindings codegen and ensuring all the // dependencies were correct would have been rather difficult. // // NOTE: You might need a data collection review if you are adding // a custom use counter. And for WebIDL methods or attributes, // deprecated operations, or CSS properties: you almost certainly // don't need a data collection review. // https://firefox-source-docs.mozilla.org/dom/use-counters.html#data-review method SVGSVGElement.getElementById attribute SVGSVGElement.currentScale // Push API method PushManager.subscribe method PushSubscription.unsubscribe // window.sidebar attribute Window.sidebar // 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 attribute DataTransfer.mozUserCancelled attribute DataTransfer.mozSourceNode // JavaScript feature usage custom JS_asmjs uses asm.js custom JS_wasm uses WebAssembly custom JS_wasm_legacy_exceptions uses WebAssembly legacy exception-handling custom JS_isHTMLDDA_fuse has used the document.all getter (popping the EmulatesUndefined Fuse) custom JS_optimizeGetIterator_fuse has modified any builtins such that the GetIterator fuse is popped custom JS_optimizeArraySpecies_fuse has modified builtin Array objects such that the ArraySpecies fuse is popped custom JS_optimizePromiseLookup_fuse has modified builtin Promise objects such that the PromiseLookup fuse is popped custom JS_thenable resolved a promise using thenable support rather than builtin methods custom JS_thenable_proto resolved a promise using thenable on prototype custom JS_thenable_standard_proto resolved a promise using thenable on a standard prototype custom JS_thenable_object_proto resolved a promise using thenable on a realms Object.prototype custom JS_legacy_lang_subtag uses a 5-to-8-character language subtag in Intl.Locale constructor custom JS_ic_stub_too_large tried to create an IC stub that was too large custom JS_ic_stub_oom OOMed while creating IC stub custom JS_errorstack_getter called error.stack getter custom JS_errorstack_getter_no_errordata called error.stack getter on object without ErrorData internal slot custom JS_errorstack_setter called error.stack setter custom JS_errorstack_setter_nonstring called error.stack setter with non-string input custom JS_errorstack_setter_no_errordata called error.stack setter on object without ErrorData internal slot custom JS_dateparse called Date.parse custom JS_dateparse_impl_def call to Date.parse used implementation defined behaviour custom JS_regexp_symbol_protocol_on_primitive passed a primitive with a custom implementation of the regexp protocol symbols to one of the String methods that accept a regexp // Console API method console.assert method console.clear method console.count method console.countReset method console.debug method console.error method console.info method console.log method console.table method console.trace method console.warn method console.dir method console.dirxml method console.group method console.groupCollapsed method console.groupEnd method console.time method console.timeLog method console.timeEnd method console.exception method console.timeStamp method console.profile method console.profileEnd // CookieStore API method CookieStore.get method CookieStore.getAll method CookieStore.set method CookieStore.delete // document.open information custom DocumentOpen calls document.open in a way that creates a new Window object // HTMLDocument named getter custom HTMLDocumentNamedGetterHit calls to the named getter on HTMLDocument that find something via the name lookup custom FilteredCrossOriginIFrame cross-origin