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 d017a19316
commit 276f1ae22d

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 =