зеркало из https://github.com/mozilla/gecko-dev.git
aef919f890
This patch changes how nsConverterInputStream handles passing data through to the underlying unicode converter in order to make it more reliably handle propagating errors and deal with short reads from the underlying input stream. This was done by making the code continuously read within the Fill method until at least one character has been decoded from the input stream, so that we don't spuriously communicate an EOF to the caller due to a short read not producing enough bytes for the decoder to produce a UTF-16 character. In addition, while making this change it became easier to signal to the decoder about the final read from the input stream, meaning that partial characters at the end of the stream will now generate a replacement character, rather than being ignored. Differential Revision: https://phabricator.services.mozilla.com/D152682 |
||
---|---|---|
.. | ||
crashtests | ||
tests | ||
components.conf | ||
directory.txt | ||
moz.build | ||
nsConverterInputStream.cpp | ||
nsConverterInputStream.h | ||
nsConverterOutputStream.cpp | ||
nsConverterOutputStream.h | ||
nsIScriptableUConv.idl | ||
nsITextToSubURI.idl | ||
nsScriptableUConv.cpp | ||
nsScriptableUConv.h | ||
nsTextToSubURI.cpp | ||
nsTextToSubURI.h |