Given that almost all uses of this are for use with `nsFIleOutputStream` which shouldn't short-write because `PR_Write` has built-in protections against that, this is probably non-essential, and we may be able to get away with doing nothing here, or returning the number of utf-16 code units written and expecting callers using non-file streams to handle it as-needed.
Bug 1783709 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Given that almost all uses of this are for use with `nsFIleOutputStream` which shouldn't short-write because `PR_Write` has built-in protections against that (see https://searchfox.org/mozilla-central/rev/4f2984be127d2e7c788cf1848d63dca63022beec/nsprpub/pr/src/pthreads/ptio.c#892-898), this is probably non-essential, and we may be able to get away with doing nothing here, or returning the number of utf-16 code units written and expecting callers using non-file streams to handle it as-needed.