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

Unified Diff: lib/dom/templates/html/frog/factoryprovider_DataView.darttemplate

Issue 10540175: Fix DataView constructor and byte accessors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « lib/dom/scripts/systemnative.py ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/templates/html/frog/factoryprovider_DataView.darttemplate
diff --git a/lib/dom/templates/html/frog/factoryprovider_DataView.darttemplate b/lib/dom/templates/html/frog/factoryprovider_DataView.darttemplate
new file mode 100644
index 0000000000000000000000000000000000000000..c3d35a79a0cef039df2ff2577971057cb613cf70
--- /dev/null
+++ b/lib/dom/templates/html/frog/factoryprovider_DataView.darttemplate
@@ -0,0 +1,13 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class $FACTORYPROVIDER {
+ factory DataView(ArrayBuffer buffer,
+ [int byteOffset = null, int byteLength = null])
+ native '''
+ if (byteOffset == null) return new DataView(buffer);
+ if (byteLength == null) return new DataView(buffer, byteOffset);
+ return new DataView(buffer, byteOffset, byteLength);
+ ''';
+}
« no previous file with comments | « lib/dom/scripts/systemnative.py ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698