Bug 1473497 - Add AutoProfilerLabel to places where we call JS from C++ through WebIDL r?mstange draft
authorNazım Can Altınova <canaltinova@gmail.com>
Thu, 05 Jul 2018 14:17:26 +0200
changeset 814472 52c9782225591ab6dfd2e55ff56958e55d55f4d4
parent 814369 90be04d99fc7941cb9b7186bf5f95e184a4e989a
push id115222
push userbmo:canaltinova@gmail.com
push dateThu, 05 Jul 2018 12:35:37 +0000
reviewersmstange
bugs1473497
milestone63.0a1
Bug 1473497 - Add AutoProfilerLabel to places where we call JS from C++ through WebIDL r?mstange MozReview-Commit-ID: DojkFTouTP8
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -15563,16 +15563,17 @@ class CGCallback(CGClass):
         errorReturn = method.getDefaultRetval()
 
         setupCall = fill(
             """
             MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
             if (!aExecutionReason) {
               aExecutionReason = "${executionReason}";
             }
+            AUTO_PROFILER_LABEL("${executionReason}", JS);
             CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aRealm);
             if (!s.GetContext()) {
               MOZ_ASSERT(aRv.Failed());
               return${errorReturn};
             }
             """,
             errorReturn=errorReturn,
             executionReason=method.getPrettyName())