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

Unified Diff: runtime/bin/filter.cc

Issue 1393013002: Ensure ZILB encoder handles all typed data lists correctly (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | sdk/lib/io/data_transformer.dart » ('j') | sdk/lib/io/data_transformer.dart » ('J')
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 f537606609fb41a3a270e1358dde709ba0ff28a4..07facdacb573d3ab79aea048fedabe87a5421980 100644
--- a/runtime/bin/filter.cc
+++ b/runtime/bin/filter.cc
@@ -154,7 +154,9 @@ void FUNCTION_NAME(Filter_Process)(Dart_NativeArguments args) {
uint8_t* buffer = NULL;
Dart_Handle result = Dart_TypedDataAcquireData(
data_obj, &type, reinterpret_cast<void**>(&buffer), &length);
+
if (!Dart_IsError(result)) {
+ ASSERT(type == Dart_TypedData_kUint8 || type == Dart_TypedData_kInt8);
Lasse Reichstein Nielsen 2015/10/08 11:26:57 Are we sure we want to treat Int8List as bytes?
uint8_t* zlib_buffer = new uint8_t[chunk_length];
if (zlib_buffer == NULL) {
Dart_TypedDataReleaseData(data_obj);
« no previous file with comments | « no previous file | sdk/lib/io/data_transformer.dart » ('j') | sdk/lib/io/data_transformer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698