Bug 1812368 - Truncate the URLs we are passing into profiler markers r=julienw

Differential Revision: https://phabricator.services.mozilla.com/D169053
This commit is contained in:
Nazım Can Altınova
2023-02-09 10:16:51 +00:00
parent 9af7ebb197
commit f5025d4aca
9 changed files with 35 additions and 36 deletions

View File

@@ -8035,8 +8035,9 @@ nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
if (profiler_thread_is_being_profiled_for_markers()) {
nsCOMPtr<nsIURI> prinURI;
BasePrincipal::Cast(thisPrincipal)->GetURI(getter_AddRefs(prinURI));
nsPrintfCString marker("Iframe loaded in background: %s",
prinURI->GetSpecOrDefault().get());
nsPrintfCString marker(
"Iframe loaded in background: %s",
nsContentUtils::TruncatedURLForDisplay(prinURI).get());
PROFILER_MARKER_TEXT("Background Iframe", DOM, {}, marker);
}
SetBackgroundLoadIframe();