Bug 785287 - Profiler: Add the document URL in DoReflow. r=roc
authorBenoit Girard <b56girard@gmail.com>
Thu, 23 Aug 2012 22:07:21 -0400
changeset 105355 5870ef9c6afacc38175f767a0989c301cc8f3445
parent 105354 3c0b16397ce910ca3e04ba058d4621d2609a5b80
child 105356 8bf32bc47aa24befbf334e90da12719b3823f3f1
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersroc
bugs785287
milestone17.0a1
Bug 785287 - Profiler: Add the document URL in DoReflow. r=roc
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -7342,17 +7342,22 @@ PresShell::ScheduleReflowOffTimer()
   }
   return true;
 }
 
 bool
 PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
 {
   NS_TIME_FUNCTION_WITH_DOCURL;
-  SAMPLE_LABEL("layout", "DoReflow");
+
+  nsCAutoString docURL("N/A");
+  nsIURI *uri = mDocument->GetDocumentURI();
+  if (uri)
+    uri->GetSpec(docURL);
+  SAMPLE_LABEL_PRINTF("layout", "DoReflow", "(%s)", docURL.get());
 
   if (mReflowContinueTimer) {
     mReflowContinueTimer->Cancel();
     mReflowContinueTimer = nullptr;
   }
 
   nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();