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 407230 da5ed94719185e9e8843e2765350a4650d2d7894
parent 407229 8d62a6ff5d9aa2ebfce7bf90a044bc6caaa7840e
child 407231 17584837b003846159d5ae59ba1c465b9a2f6947
push id60852
push userbgrinstead@mozilla.com
push dateThu, 08 Mar 2018 18:54:40 +0000
treeherderautoland@da5ed9471918 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1440729
milestone60.0a1
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
dom/base/UseCounters.conf
dom/webidl/Console.webidl
--- 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 @@
  ClassString="Console",
  ProtoObjectHack]
 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);
 
   [ChromeOnly]
   const boolean IS_NATIVE_CONSOLE = true;
 
   [ChromeOnly, NewObject]
   ConsoleInstance createInstance(optional ConsoleInstanceOptions options);
 };