Bug 1504742 - Add a label for imgLoader::LoadImage that has the URL. r=aosmond
authorMarkus Stange <mstange@themasta.com>
Mon, 05 Nov 2018 18:13:39 +0000
changeset 444460 35bdf87e61e60186b1178de0801a3359d6d81711
parent 444459 b5d968d728ea6babb6ebaf0f377eaf45415a04e1
child 444461 84367a375806c9f2045f872c08b52617f9d85033
push id34996
push userrgurzau@mozilla.com
push dateTue, 06 Nov 2018 09:53:23 +0000
treeherdermozilla-central@e160f0a60e4f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond
bugs1504742
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1504742 - Add a label for imgLoader::LoadImage that has the URL. r=aosmond Depends on D10928 Differential Revision: https://phabricator.services.mozilla.com/D10929
image/imgLoader.cpp
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -2313,16 +2313,21 @@ imgLoader::LoadImage(nsIURI* aURI,
   VerifyCacheSizes();
 
   NS_ASSERTION(aURI, "imgLoader::LoadImage -- NULL URI pointer");
 
   if (!aURI) {
     return NS_ERROR_NULL_POINTER;
   }
 
+#ifdef MOZ_GECKO_PROFILER
+  AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING(
+    "imgLoader::LoadImage", NETWORK, aURI->GetSpecOrDefault());
+#endif
+
   LOG_SCOPE_WITH_PARAM(gImgLog, "imgLoader::LoadImage", "aURI", aURI);
 
   *_retval = nullptr;
 
   RefPtr<imgRequest> request;
 
   nsresult rv;
   nsLoadFlags requestFlags = nsIRequest::LOAD_NORMAL;