Chromium Code Reviews| Index: courgette/ensemble_apply.cc |
| =================================================================== |
| --- courgette/ensemble_apply.cc (revision 78901) |
| +++ courgette/ensemble_apply.cc (working copy) |
| @@ -220,10 +220,14 @@ |
| SinkStream* basic_elements) { |
| // Construct blob of original input followed by reformed elements. |
| - basic_elements->Reserve(final_patch_input_size_prediction_); |
| + if (final_patch_input_size_prediction_ && |
|
robertshield
2011/03/22 18:04:07
Even though this looks right, this is a functional
tommi (sloooow) - chröme
2011/03/22 18:37:49
Removed the first check to maintain the previous f
|
| + !basic_elements->Reserve(final_patch_input_size_prediction_)) { |
| + return C_STREAM_ERROR; |
| + } |
| // The original input: |
| - basic_elements->Write(base_region_.start(), base_region_.length()); |
| + if (!basic_elements->Write(base_region_.start(), base_region_.length())) |
| + return C_STREAM_ERROR; |
| for (size_t i = 0; i < patchers_.size(); ++i) { |
| SourceStreamSet single_corrected_element; |