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

This is handy for figuring what's being restyled in profiles.

--HG--
extra : rebase_source : 526e5c58183415542cc3b726d5b96545c80926f3
This commit is contained in:
Jeff Muizelaar 2015-05-27 18:01:50 -04:00
parent 0605798fbc
commit 872cf9ce7c

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 =