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

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

Issue 10539170: 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
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])
Anton Muhin 2012/06/18 10:25:35 why explicit null defaults?
+ native '''
+ if (byteOffset == null) return new DataView(buffer);
Anton Muhin 2012/06/18 10:25:35 nit: === instead of ==?
+ if (byteLength == null) return new DataView(buffer, byteOffset);
+ return new DataView(buffer, byteOffset, byteLength);
+ ''';
+}

Powered by Google App Engine
This is Rietveld 408576698