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

Unified Diff: runtime/lib/typeddata.dart

Issue 12938010: Implement creation of ByteData objects using the Dart API. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/typeddata.dart
===================================================================
--- runtime/lib/typeddata.dart (revision 20330)
+++ runtime/lib/typeddata.dart (working copy)
@@ -228,12 +228,12 @@
patch class ByteData {
/* patch */ factory ByteData(int length) {
var list = new _Uint8Array(length);
- return new _ByteDataView(list.buffer);
+ return new _ByteDataView(list.buffer, 0, length);
}
/* patch */ factory ByteData.transferable(int length) {
vsm 2013/03/21 18:35:27 I don't see the transferable constructor declared
siva 2013/03/22 01:42:11 I think Anton at one point wanted a way to create
var list = new _Uint8Array.transferable(length);
- return new _ByteDataView(list.buffer);
+ return new _ByteDataView(list.buffer, 0, length);
}
/* patch */ factory ByteData.view(ByteBuffer buffer,
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698