Bug 1464909 - Add the "GC / CC" category to AsyncFreeSnowWhite::Run. r?smaug
MozReview-Commit-ID: KEZUstzTHhn
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -117,16 +117,18 @@ const char* const XPCJSRuntime::mStrings
// So, in mClassInfo2NativeSetMap we just clear references to the unmarked.
// In mNativeSetMap we clear the references to the unmarked *and* delete them.
class AsyncFreeSnowWhite : public Runnable
{
public:
NS_IMETHOD Run() override
{
+ AUTO_PROFILER_LABEL("AsyncFreeSnowWhite::Run", GCCC);
+
TimeStamp start = TimeStamp::Now();
bool hadSnowWhiteObjects = nsCycleCollector_doDeferredDeletion();
Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_ASYNC_SNOW_WHITE_FREEING,
uint32_t((TimeStamp::Now() - start).ToMilliseconds()));
if (hadSnowWhiteObjects && !mContinuation) {
mContinuation = true;
if (NS_FAILED(Dispatch())) {
mActive = false;