mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 20:37:31 +09:00
[gfx] Use gzip stream total_out for SVG document parsing.
With this change, the assert is no longer necessary, because the stream tells us how many elements to process.
This commit is contained in:
parent
1cef1ae767
commit
b8890277ba
1 changed files with 1 additions and 2 deletions
|
|
@ -311,8 +311,7 @@ gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t *aBuffer,
|
||||||
if (Z_OK == inflateInit2(&s, 16 + MAX_WBITS)) {
|
if (Z_OK == inflateInit2(&s, 16 + MAX_WBITS)) {
|
||||||
int result = inflate(&s, Z_FINISH);
|
int result = inflate(&s, Z_FINISH);
|
||||||
if (Z_STREAM_END == result) {
|
if (Z_STREAM_END == result) {
|
||||||
MOZ_ASSERT(size_t(s.next_out - outBuf.Elements()) == origLen);
|
ParseDocument(outBuf.Elements(), s.total_out);
|
||||||
ParseDocument(outBuf.Elements(), outBuf.Length());
|
|
||||||
} else {
|
} else {
|
||||||
NS_WARNING("Failed to decompress SVG glyphs document");
|
NS_WARNING("Failed to decompress SVG glyphs document");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue