Bug 1440729 - Include use counters for the console API r=baku
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 23 Feb 2018 16:11:16 -0800
changeset 407235 da5ed94719185e9e8843e2765350a4650d2d7894
parent 407234 8d62a6ff5d9aa2ebfce7bf90a044bc6caaa7840e
child 407236 17584837b003846159d5ae59ba1c465b9a2f6947
push id33597
push userdluca@mozilla.com
push dateFri, 09 Mar 2018 09:59:33 +0000
treeherdermozilla-central@f1965cf7425f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1440729 - Include use counters for the console API r=baku MozReview-Commit-ID: 9A1lllxW7lM
--- a/dom/base/UseCounters.conf
+++ b/dom/base/UseCounters.conf
@@ -88,8 +88,31 @@ 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
+// Console API
+method console.assert
+method console.clear
+method console.count
+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.timeEnd
+method console.exception
+method console.timeStamp
+method console.profile
+method console.profileEnd
--- a/dom/webidl/Console.webidl
+++ b/dom/webidl/Console.webidl
@@ -12,44 +12,65 @@
 namespace console {
   // NOTE: if you touch this namespace, remember to update the ConsoleInstance
   // interface as well!
   // Logging
+  [UseCounter]
   void assert(optional boolean condition = false, any... data);
+  [UseCounter]
   void clear();
+  [UseCounter]
   void count(optional DOMString label = "default");
+  [UseCounter]
   void debug(any... data);
+  [UseCounter]
   void error(any... data);
+  [UseCounter]
   void info(any... data);
+  [UseCounter]
   void log(any... data);
+  [UseCounter]
   void table(any... data); // FIXME: The spec is still unclear about this.
+  [UseCounter]
   void trace(any... data);
+  [UseCounter]
   void warn(any... data);
+  [UseCounter]
   void dir(any... data); // FIXME: This doesn't follow the spec yet.
+  [UseCounter]
   void dirxml(any... data);
   // Grouping
+  [UseCounter]
   void group(any... data);
+  [UseCounter]
   void groupCollapsed(any... data);
+  [UseCounter]
   void groupEnd();
   // Timing
+  [UseCounter]
   void time(optional DOMString label = "default");
+  [UseCounter]
   void timeEnd(optional DOMString label = "default");
   // Mozilla only or Webcompat methods
+  [UseCounter]
   void _exception(any... data);
+  [UseCounter]
   void timeStamp(optional any data);
+  [UseCounter]
   void profile(any... data);
+  [UseCounter]
   void profileEnd(any... data);
   const boolean IS_NATIVE_CONSOLE = true;
   [ChromeOnly, NewObject]
   ConsoleInstance createInstance(optional ConsoleInstanceOptions options);