Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: runtime/bin/filter.cc

Issue 14241021: Fix Zlib filters to correctly emit the last chunks of data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/io/regress_10026_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/filter.cc
diff --git a/runtime/bin/filter.cc b/runtime/bin/filter.cc
index 61a499cde491e862f3e874dda2a7ddb736390e90..1a609c576e36ab8e4b28df00c655ba9617f029aa 100644
--- a/runtime/bin/filter.cc
+++ b/runtime/bin/filter.cc
@@ -278,6 +278,8 @@ intptr_t ZLibInflateFilter::Processed(uint8_t* buffer,
stream_.avail_out = length;
stream_.next_out = buffer;
switch (inflate(&stream_, flush ? Z_SYNC_FLUSH : Z_NO_FLUSH)) {
+ case Z_STREAM_END:
+ case Z_BUF_ERROR:
case Z_OK: {
intptr_t processed = length - stream_.avail_out;
if (processed == 0) {
@@ -290,13 +292,6 @@ intptr_t ZLibInflateFilter::Processed(uint8_t* buffer,
}
}
- case Z_STREAM_END:
- case Z_BUF_ERROR:
- // We processed all available input data.
- delete[] current_buffer_;
- current_buffer_ = NULL;
- return 0;
-
default:
case Z_MEM_ERROR:
case Z_NEED_DICT:
« no previous file with comments | « no previous file | tests/standalone/io/regress_10026_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698