XHR.send(Document) should replace mismatched surrogates with replacement character before sending
Created attachment 433971 [details] Patch
Comment on attachment 433971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433971&action=review > Source/WebCore/xml/XMLHttpRequest.cpp:467 > +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] Patch
Created attachment 433987 [details] Patch
Comment on attachment 433987 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433987&action=review > Source/WebCore/xml/XMLHttpRequest.cpp:487 > + 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] Patch
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].
<rdar://problem/80970543>