mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1790873
- Send a full line at a time to printf_stderr in nsUniscribeBreaker.cpp r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D166852
This commit is contained in:
parent
9fee65ea32
commit
acb8aa17fa
@ -126,20 +126,20 @@ void NS_GetComplexLineBreaks(const char16_t* aText, uint32_t aLength,
|
||||
}
|
||||
|
||||
if (mismatch) {
|
||||
nsCString line("uniscribe: ");
|
||||
// The logging here doesn't handle surrogates, but we only have tests using
|
||||
// Thai currently, which is BMP-only.
|
||||
printf_stderr("uniscribe: ");
|
||||
for (uint32_t i = 0; i < aLength; ++i) {
|
||||
if (aBreakBefore[i]) printf_stderr("#");
|
||||
printf_stderr("%s", NS_ConvertUTF16toUTF8(aText + i, 1).get());
|
||||
if (aBreakBefore[i]) line.Append('#');
|
||||
line.Append(NS_ConvertUTF16toUTF8(aText + i, 1).get());
|
||||
}
|
||||
printf_stderr("\n");
|
||||
printf_stderr("brokered : ");
|
||||
printf_stderr("%s\n", line.get());
|
||||
line.Assign("brokered : ");
|
||||
for (uint32_t i = 0; i < aLength; ++i) {
|
||||
if (brokeredBreaks[i]) printf_stderr("#");
|
||||
printf_stderr("%s", NS_ConvertUTF16toUTF8(aText + i, 1).get());
|
||||
if (brokeredBreaks[i]) line.Append('#');
|
||||
line.Append(NS_ConvertUTF16toUTF8(aText + i, 1).get());
|
||||
}
|
||||
printf_stderr("\n");
|
||||
printf_stderr("%s\n", line.get());
|
||||
MOZ_CRASH("Brokered breaks did not match.");
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user