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

@@ -6361,7 +6361,8 @@ void PresShell::PaintInternal(nsView* aViewToPaint, PaintInternalFlags aFlags) {
uri = contentRoot->GetDocumentURI();
}
url = uri ? uri->GetSpecOrDefault() : "N/A"_ns;
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING_RELEVANT_FOR_JS("Paint", GRAPHICS, url);
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING_RELEVANT_FOR_JS(
"Paint", GRAPHICS, Substring(url, std::min(size_t(128), url.Length())));
Maybe<js::AutoAssertNoContentJS> nojs;