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:
Justin Lebar 2013-08-05 16:33:00 -07:00
parent 253d4a3119
commit 094709ed3d

View File

@ -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 +