Bug 1168950. Add the document to DoProcessRestyles profile label. r=dbaron

This is handy for figuring what's being restyled in profiles.
This commit is contained in:
Jeff Muizelaar 2015-05-27 18:01:50 -04:00
parent d9a8f57cbb
commit e01d7a248f

View File

@ -224,8 +224,17 @@ RestyleTracker::ProcessOneRestyle(Element* aElement,
void
RestyleTracker::DoProcessRestyles()
{
PROFILER_LABEL("RestyleTracker", "ProcessRestyles",
js::ProfileEntry::Category::CSS);
nsAutoCString docURL;
if (profiler_is_active()) {
nsIURI *uri = Document()->GetDocumentURI();
if (uri) {
uri->GetSpec(docURL);
} else {
docURL = "N/A";
}
}
PROFILER_LABEL_PRINTF("RestyleTracker", "ProcessRestyles",
js::ProfileEntry::Category::CSS, "(%s)", docURL.get());
bool isTimelineRecording = false;
nsDocShell* docShell =