mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 14:54:25 +00: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:
@@ -311,8 +311,7 @@ gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t *aBuffer,
|
||||
if (Z_OK == inflateInit2(&s, 16 + MAX_WBITS)) {
|
||||
int result = inflate(&s, Z_FINISH);
|
||||
if (Z_STREAM_END == result) {
|
||||
MOZ_ASSERT(size_t(s.next_out - outBuf.Elements()) == origLen);
|
||||
ParseDocument(outBuf.Elements(), outBuf.Length());
|
||||
ParseDocument(outBuf.Elements(), s.total_out);
|
||||
} else {
|
||||
NS_WARNING("Failed to decompress SVG glyphs document");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user