mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 893222 - Part 2: Fix escaping for huge strings displayed in about:memory. r=njn
We were escaping "/" to "\/", but about:memory expects us to escape "/" to "\". Escaping "/" to "\/" is probably quite sensible, since then we can represent strings which have both "\" and "/". But that's a bigger change.
This commit is contained in:
parent
3d26462c81
commit
86bb070e23
@ -1740,11 +1740,11 @@ ReportZoneStats(const JS::ZoneStats &zStats,
|
||||
|
||||
nsDependentCString hugeString(info.buffer);
|
||||
|
||||
// Escape / to \/ before we put hugeString into the memory reporter
|
||||
// Escape / to \ before we put hugeString into the memory reporter
|
||||
// path, because we don't want any forward slashes in the string to
|
||||
// count as path separators.
|
||||
nsCString escapedString(hugeString);
|
||||
escapedString.ReplaceSubstring("/", "\\/");
|
||||
escapedString.ReplaceSubstring("/", "\\");
|
||||
|
||||
ZCREPORT_BYTES2(
|
||||
pathPrefix +
|
||||
|
Loading…
Reference in New Issue
Block a user