mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Bug 1828073 - Fix invalid UTF-16 crashing Windows Toast notifications. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D178745
This commit is contained in:
parent
a2ce4d8879
commit
5c712cbc47
@ -451,9 +451,19 @@ ToastNotification::ShowAlert(nsIAlertNotification* aAlert,
|
||||
|
||||
nsAutoString title;
|
||||
MOZ_TRY(aAlert->GetTitle(title));
|
||||
if (!EnsureUTF16Validity(title)) {
|
||||
MOZ_LOG(sWASLog, LogLevel::Warning,
|
||||
("Notification title was invalid UTF16, unpaired surrogates have "
|
||||
"been replaced."));
|
||||
}
|
||||
|
||||
nsAutoString text;
|
||||
MOZ_TRY(aAlert->GetText(text));
|
||||
if (!EnsureUTF16Validity(text)) {
|
||||
MOZ_LOG(sWASLog, LogLevel::Warning,
|
||||
("Notification text was invalid UTF16, unpaired surrogates have "
|
||||
"been replaced."));
|
||||
}
|
||||
|
||||
bool textClickable;
|
||||
MOZ_TRY(aAlert->GetTextClickable(&textClickable));
|
||||
|
Loading…
x
Reference in New Issue
Block a user