OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 12 matching lines...) Expand all Loading... |
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 [ | 26 [ |
27 GlobalContext=WindowAndWorker, | 27 GlobalContext=WindowAndWorker, |
28 CustomConstructor(ArrayBuffer buffer, optional unsigned long byteOffset, opt
ional unsigned long byteLength), | 28 CustomConstructor(ArrayBuffer buffer, optional unsigned long byteOffset, opt
ional unsigned long byteLength), |
29 CustomToV8 | 29 CustomToV8 |
30 ] interface DataView : ArrayBufferView { | 30 ] interface DataView : ArrayBufferView { |
31 // All these methods raise an exception if they would read or write beyond t
he end of the view. | 31 // All these methods raise an exception if they would read or write beyond t
he end of the view. |
32 | 32 |
33 // We have to use custom code because our code generator does not support in
t8_t type. | 33 [RaisesException] byte getInt8(unsigned long byteOffset); |
34 // int8_t getInt8(unsigned long byteOffset); | 34 [RaisesException] octet getUint8(unsigned long byteOffset); |
35 // uint8_t getUint8(unsigned long byteOffset); | |
36 [Custom, RaisesException] any getInt8(); | |
37 [Custom, RaisesException] any getUint8(); | |
38 | 35 |
39 [StrictTypeChecking, RaisesException] short getInt16(unsigned long byteOffse
t, optional boolean littleEndian); | 36 [StrictTypeChecking, RaisesException] short getInt16(unsigned long byteOffse
t, optional boolean littleEndian); |
40 [StrictTypeChecking, RaisesException] unsigned short getUint16(unsigned long
byteOffset, optional boolean littleEndian); | 37 [StrictTypeChecking, RaisesException] unsigned short getUint16(unsigned long
byteOffset, optional boolean littleEndian); |
41 [StrictTypeChecking, RaisesException] long getInt32(unsigned long byteOffset
, optional boolean littleEndian); | 38 [StrictTypeChecking, RaisesException] long getInt32(unsigned long byteOffset
, optional boolean littleEndian); |
42 [StrictTypeChecking, RaisesException] unsigned long getUint32(unsigned long
byteOffset, optional boolean littleEndian); | 39 [StrictTypeChecking, RaisesException] unsigned long getUint32(unsigned long
byteOffset, optional boolean littleEndian); |
43 | 40 |
44 // Use custom code to handle NaN case for JSC. | 41 // Use custom code to handle NaN case for JSC. |
45 [StrictTypeChecking, RaisesException] float getFloat32(unsigned long byteOff
set, optional boolean littleEndian); | 42 [StrictTypeChecking, RaisesException] float getFloat32(unsigned long byteOff
set, optional boolean littleEndian); |
46 [StrictTypeChecking, RaisesException] double getFloat64(unsigned long byteOf
fset, optional boolean littleEndian); | 43 [StrictTypeChecking, RaisesException] double getFloat64(unsigned long byteOf
fset, optional boolean littleEndian); |
47 | 44 |
48 // We have to use custom code because our code generator does not support ui
nt8_t type. | 45 [RaisesException] void setInt8(unsigned long byteOffset, byte value); |
49 // void setInt8(unsigned long byteOffset, int8_t value); | 46 [RaisesException] void setUint8(unsigned long byteOffset, octet value); |
50 // void setUint8(unsigned long byteOffset, uint8_t value); | |
51 [Custom, RaisesException] void setInt8(); | |
52 [Custom, RaisesException] void setUint8(); | |
53 | 47 |
54 [StrictTypeChecking, RaisesException] void setInt16(unsigned long byteOffset
, short value, optional boolean littleEndian); | 48 [StrictTypeChecking, RaisesException] void setInt16(unsigned long byteOffset
, short value, optional boolean littleEndian); |
55 [StrictTypeChecking, RaisesException] void setUint16(unsigned long byteOffse
t, unsigned short value, optional boolean littleEndian); | 49 [StrictTypeChecking, RaisesException] void setUint16(unsigned long byteOffse
t, unsigned short value, optional boolean littleEndian); |
56 [StrictTypeChecking, RaisesException] void setInt32(unsigned long byteOffset
, long value, optional boolean littleEndian); | 50 [StrictTypeChecking, RaisesException] void setInt32(unsigned long byteOffset
, long value, optional boolean littleEndian); |
57 [StrictTypeChecking, RaisesException] void setUint32(unsigned long byteOffse
t, unsigned long value, optional boolean littleEndian); | 51 [StrictTypeChecking, RaisesException] void setUint32(unsigned long byteOffse
t, unsigned long value, optional boolean littleEndian); |
58 [StrictTypeChecking, RaisesException] void setFloat32(unsigned long byteOffs
et, float value, optional boolean littleEndian); | 52 [StrictTypeChecking, RaisesException] void setFloat32(unsigned long byteOffs
et, float value, optional boolean littleEndian); |
59 [StrictTypeChecking, RaisesException] void setFloat64(unsigned long byteOffs
et, double value, optional boolean littleEndian); | 53 [StrictTypeChecking, RaisesException] void setFloat64(unsigned long byteOffs
et, double value, optional boolean littleEndian); |
60 }; | 54 }; |
61 | 55 |
OLD | NEW |