зеркало из https://github.com/mozilla/gecko-dev.git
Bug 801780 - Part 1: Escape quotes in memory reporter paths when dumping to JSON. r=njn, a=akeybl
This commit is contained in:
Родитель
9349c70d73
Коммит
543b5c7c36
|
@ -399,7 +399,8 @@ DumpReport(nsIGZFileWriter *aWriter, bool aIsFirst,
|
|||
|
||||
DUMP(aWriter, "\", \"path\": \"");
|
||||
nsCString path(aPath);
|
||||
path.ReplaceSubstring("\\", "\\\\"); // escape backslashes for JSON
|
||||
path.ReplaceSubstring("\\", "\\\\"); /* <backslash> --> \\ */
|
||||
path.ReplaceSubstring("\"", "\\\""); // " --> \"
|
||||
DUMP(aWriter, path);
|
||||
|
||||
DUMP(aWriter, "\", \"kind\": ");
|
||||
|
|
Загрузка…
Ссылка в новой задаче