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

Unified Diff: lib/dom/frog/dom_frog.dart

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/dom.dart ('k') | lib/dom/idl/dart/dart.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/frog/dom_frog.dart
diff --git a/lib/dom/frog/dom_frog.dart b/lib/dom/frog/dom_frog.dart
index e70dd2272a14f82f208f995eed85a62400984399..5cba2b2fa7ee21a616b19fcfbb76d35bf7193933 100644
--- a/lib/dom/frog/dom_frog.dart
+++ b/lib/dom/frog/dom_frog.dart
@@ -1497,13 +1497,13 @@ class _DataViewJs extends _ArrayBufferViewJs implements DataView native "*DataVi
int getInt32(int byteOffset, [bool littleEndian = null]) native;
- Object getInt8() native;
+ int getInt8(int byteOffset) native;
int getUint16(int byteOffset, [bool littleEndian = null]) native;
int getUint32(int byteOffset, [bool littleEndian = null]) native;
- Object getUint8() native;
+ int getUint8(int byteOffset) native;
void setFloat32(int byteOffset, num value, [bool littleEndian = null]) native;
@@ -1513,13 +1513,13 @@ class _DataViewJs extends _ArrayBufferViewJs implements DataView native "*DataVi
void setInt32(int byteOffset, int value, [bool littleEndian = null]) native;
- void setInt8() native;
+ void setInt8(int byteOffset, int value) native;
void setUint16(int byteOffset, int value, [bool littleEndian = null]) native;
void setUint32(int byteOffset, int value, [bool littleEndian = null]) native;
- void setUint8() native;
+ void setUint8(int byteOffset, int value) native;
}
class _DatabaseJs extends _DOMTypeJs implements Database native "*Database" {
@@ -11947,6 +11947,14 @@ class _DOMURLFactoryProvider {
// 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 _DataViewFactoryProvider {
+ factory DataView(ArrayBuffer buffer, [int byteOffset = null, int byteLength = null]) native
+ '''return new DataView(buffer, byteOffset, byteLength);''';
+}
+// 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 _DeprecatedPeerConnectionFactoryProvider {
factory DeprecatedPeerConnection(String serverConfiguration, SignalingCallback signalingCallback) native
'''return new DeprecatedPeerConnection(serverConfiguration, signalingCallback);''';
@@ -13929,7 +13937,9 @@ interface DataTransferItemList {
// WARNING: Do not edit - generated code.
-interface DataView extends ArrayBufferView {
+interface DataView extends ArrayBufferView default _DataViewFactoryProvider {
+
+ DataView(ArrayBuffer buffer, [int byteOffset, int byteLength]);
num getFloat32(int byteOffset, [bool littleEndian]);
@@ -13939,13 +13949,13 @@ interface DataView extends ArrayBufferView {
int getInt32(int byteOffset, [bool littleEndian]);
- Object getInt8();
+ int getInt8(int byteOffset);
int getUint16(int byteOffset, [bool littleEndian]);
int getUint32(int byteOffset, [bool littleEndian]);
- Object getUint8();
+ int getUint8(int byteOffset);
void setFloat32(int byteOffset, num value, [bool littleEndian]);
@@ -13955,13 +13965,13 @@ interface DataView extends ArrayBufferView {
void setInt32(int byteOffset, int value, [bool littleEndian]);
- void setInt8();
+ void setInt8(int byteOffset, int value);
void setUint16(int byteOffset, int value, [bool littleEndian]);
void setUint32(int byteOffset, int value, [bool littleEndian]);
- void setUint8();
+ void setUint8(int byteOffset, int value);
}
// 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
« no previous file with comments | « lib/dom/dom.dart ('k') | lib/dom/idl/dart/dart.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698