Bug 1462784 - Add a DOM category and use it for the WebIDL binding stack labels. r?njn
MozReview-Commit-ID: AevGMqeBvXO
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1574,17 +1574,17 @@ class CGAbstractMethod(CGThing):
decorators.append('static')
decorators.append(self.returnType)
maybeNewline = " " if self.inline else "\n"
return ' '.join(decorators) + maybeNewline
def _auto_profiler_label(self):
profiler_label_and_jscontext = self.profiler_label_and_jscontext()
if profiler_label_and_jscontext:
- return 'AUTO_PROFILER_LABEL_FAST("%s", OTHER, %s);' % profiler_label_and_jscontext
+ return 'AUTO_PROFILER_LABEL_FAST("%s", DOM, %s);' % profiler_label_and_jscontext
return None
def declare(self):
if self.inline:
return self._define(True)
return "%s%s%s(%s);\n" % (self._template(), self._decorators(), self.name, self._argstring(True))
def indent_body(self, body):
--- a/js/public/ProfilingStack.h
+++ b/js/public/ProfilingStack.h
@@ -191,16 +191,17 @@ class ProfilingStackFrame
// Keep these in sync with devtools/client/performance/modules/categories.js
enum class Category : uint32_t {
OTHER,
LAYOUT,
JS,
GCCC,
NETWORK,
GRAPHICS,
+ DOM,
STORAGE,
FIRST = OTHER,
LAST = STORAGE,
};
static_assert(uint32_t(Category::LAST) <= (UINT32_MAX >> uint32_t(Kind::KIND_BITCOUNT)),
"Too many categories to fit into u32 with two bits reserved for the kind");