XHR.send(Document) should replace mismatched surrogates with replacement character before sending
Created attachment 433971 [details]
Comment on attachment 433971 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=433971&action=review
> +static String convertIfNecessary(const String& input)
Isn't this the same as stringToUSVString()? If so, can we reuse it (maybe renaming stringToUSVString to replaceUnpairedSurrogatesWithReplacementCharacter, as its associated FIXME comment says)?
Aha! I knew it must exist already
Created attachment 433983 [details]
Created attachment 433987 [details]
Comment on attachment 433987 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=433987&action=review
> + auto converted = stringToUSVString(WTFMove(serialized));
Would have been nice to rename stringToUSVString() to replaceUnpairedSurrogatesWithReplacementCharacter() since you are reusing it here for something that is not strictly a USVString conversion.
Created attachment 434016 [details]
Committed r280181 (239875@main): <https://commits.webkit.org/239875@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 434016 [details].