Chromium Code Reviews| Index: content/browser/tracing/tracing_controller_impl_data_sinks.cc |
| diff --git a/content/browser/tracing/tracing_controller_impl_data_sinks.cc b/content/browser/tracing/tracing_controller_impl_data_sinks.cc |
| index 86f0df224ba888da6fb8b8e8458301ddfc6316ae..ccc32f44dd73c1c8bc0589d0fcf9c13369f00667 100644 |
| --- a/content/browser/tracing/tracing_controller_impl_data_sinks.cc |
| +++ b/content/browser/tracing/tracing_controller_impl_data_sinks.cc |
| @@ -252,7 +252,8 @@ class CompressedTraceDataEndpoint : public TraceDataEndpoint { |
| stream_->avail_out = kChunkSize; |
| stream_->next_out = (unsigned char*)buffer; |
| err = deflate(stream_.get(), finished ? Z_FINISH : Z_NO_FLUSH); |
| - if (err != (finished ? Z_STREAM_END : Z_OK)) { |
| + if (err != Z_OK && (!finished || err != Z_STREAM_END)) { |
| + LOG(ERROR) << "Deflate sream error: " << err; |
|
shatch
2016/07/29 18:46:45
nit: sream
|
| stream_.reset(); |
| return; |
| } |