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

Unified Diff: sdk/lib/io/data_transformer.dart

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
Index: sdk/lib/io/data_transformer.dart
diff --git a/sdk/lib/io/data_transformer.dart b/sdk/lib/io/data_transformer.dart
index f9f974a8650eb7d3c665744f39854b595f49ca9a..4db93e3cc3e7fb088ccab7e7ccacc5aa8885084c 100644
--- a/sdk/lib/io/data_transformer.dart
+++ b/sdk/lib/io/data_transformer.dart
@@ -491,7 +491,11 @@ class _FilterSink extends ByteConversionSink {
}
Lasse Reichstein Nielsen 2015/10/08 11:26:57 This could do with updating: if (end == null) th
try {
_empty = false;
- _filter.process(data, start, end);
+ _BufferAndStart bufferAndStart =
Lasse Reichstein Nielsen 2015/10/08 11:26:57 Have you considered having _ensureFastAndSerializa
+ _ensureFastAndSerializableByteData(data, start, end);
+ _filter.process(bufferAndStart.buffer,
+ bufferAndStart.start,
+ end - (start - bufferAndStart.start));
var out;
while ((out = _filter.processed(flush: false)) != null) {
_sink.add(out);

Powered by Google App Engine
This is Rietveld 408576698