Chromium Code Reviews| Index: runtime/bin/filter.cc |
| diff --git a/runtime/bin/filter.cc b/runtime/bin/filter.cc |
| index 3515052321aaa0221069f1fabaed5963c42abc1d..19d97de8b2777d0bab0f3858e5f878db9a0690ab 100644 |
| --- a/runtime/bin/filter.cc |
| +++ b/runtime/bin/filter.cc |
| @@ -133,11 +133,12 @@ void FUNCTION_NAME(Filter_Processed)(Dart_NativeArguments args) { |
| Dart_ThrowException(DartUtils::NewInternalError( |
| "Failed to get 'flush' parameter")); |
| } |
| - uint8_t buffer[kFilterBufferLength]; |
| + uint8_t* buffer = new uint8_t[kFilterBufferLength]; |
|
siva
2013/03/15 07:47:00
Not sure how frequently this function is called bu
Mads Ager (google)
2013/03/15 09:24:56
I don't have any data on how often this is called
|
| intptr_t read = filter->Processed(buffer, kFilterBufferLength, flush); |
| if (read < 0) { |
| // Error, end filter. |
| EndFilter(filter_obj, filter); |
| + delete[] buffer; |
| Dart_ThrowException(DartUtils::NewInternalError( |
| "Filter error, bad data")); |
| } else if (read == 0) { |
| @@ -148,6 +149,7 @@ void FUNCTION_NAME(Filter_Processed)(Dart_NativeArguments args) { |
| memmove(io_buffer, buffer, read); |
| Dart_SetReturnValue(args, result); |
| } |
| + delete[] buffer; |
| Dart_ExitScope(); |
| } |