mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 733282. r=smontagu.
This commit is contained in:
parent
9f5a593ca0
commit
c6a3e70119
@ -850,10 +850,20 @@ nsHtml5StreamParser::WriteStreamBytes(const PRUint8* aFromSegment,
|
||||
}
|
||||
|
||||
// Emit the REPLACEMENT CHARACTER
|
||||
if (end >= NS_HTML5_STREAM_PARSER_READ_BUFFER_SIZE) {
|
||||
nsRefPtr<nsHtml5OwningUTF16Buffer> newBuf =
|
||||
nsHtml5OwningUTF16Buffer::FalliblyCreate(
|
||||
NS_HTML5_STREAM_PARSER_READ_BUFFER_SIZE);
|
||||
if (!newBuf) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
mLastBuffer = (mLastBuffer->next = newBuf.forget());
|
||||
end = 0;
|
||||
}
|
||||
mLastBuffer->getBuffer()[end] = 0xFFFD;
|
||||
++end;
|
||||
mLastBuffer->setEnd(end);
|
||||
if (end == NS_HTML5_STREAM_PARSER_READ_BUFFER_SIZE) {
|
||||
if (end >= NS_HTML5_STREAM_PARSER_READ_BUFFER_SIZE) {
|
||||
nsRefPtr<nsHtml5OwningUTF16Buffer> newBuf =
|
||||
nsHtml5OwningUTF16Buffer::FalliblyCreate(
|
||||
NS_HTML5_STREAM_PARSER_READ_BUFFER_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user