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

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

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 9 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/mime_multipart_parser.dart
diff --git a/sdk/lib/io/mime_multipart_parser.dart b/sdk/lib/io/mime_multipart_parser.dart
index 0721e46c151a4ad0dae0d787aa27373ac20b82b4..cd12c2023394413046e0dd2449b8d8b8d416ba0a 100644
--- a/sdk/lib/io/mime_multipart_parser.dart
+++ b/sdk/lib/io/mime_multipart_parser.dart
@@ -79,17 +79,17 @@ class _MimeMultipartParser {
var contentLength = boundaryPrefix + index - _boundaryIndex;
if (contentLength <= boundaryPrefix) {
partDataReceived(
- _boundary.getRange(0, contentLength));
+ _boundary.sublist(0, contentLength));
} else {
partDataReceived(
- _boundary.getRange(0, boundaryPrefix));
+ _boundary.sublist(0, boundaryPrefix));
partDataReceived(
- buffer.getRange(0, contentLength - boundaryPrefix));
+ buffer.sublist(0, contentLength - boundaryPrefix));
}
} else {
- var contentLength = index - contentStartIndex - _boundaryIndex;
+ var contentEndIndex = index - _boundaryIndex;
partDataReceived(
- buffer.getRange(contentStartIndex, contentLength));
+ buffer.sublist(contentStartIndex, contentEndIndex));
}
}

Powered by Google App Engine
This is Rietveld 408576698