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

Side by Side Diff: mojo/public/js/bindings/codec.js

Issue 411553003: Validate incoming JS Message Headers: test message parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed WebUIMojoTest.EndToEndPing Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/js/bindings/buffer.js ('k') | mojo/public/js/bindings/codec_unittests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 define("mojo/public/js/bindings/codec", [ 5 define("mojo/public/js/bindings/codec", [
6 "mojo/public/js/bindings/unicode" 6 "mojo/public/js/bindings/unicode",
7 ], function(unicode) { 7 "mojo/public/js/bindings/buffer"
8 ], function(unicode, buffer) {
8 9
9 var kErrorUnsigned = "Passing negative value to unsigned"; 10 var kErrorUnsigned = "Passing negative value to unsigned";
10 11
11 // Memory ------------------------------------------------------------------- 12 // Memory -------------------------------------------------------------------
12 13
13 var kAlignment = 8; 14 var kAlignment = 8;
14 var kHighWordMultiplier = 0x100000000;
15 var kHostIsLittleEndian = (function () {
16 var endianArrayBuffer = new ArrayBuffer(2);
17 var endianUint8Array = new Uint8Array(endianArrayBuffer);
18 var endianUint16Array = new Uint16Array(endianArrayBuffer);
19 endianUint16Array[0] = 1;
20 return endianUint8Array[0] == 1;
21 })();
22 15
23 function align(size) { 16 function align(size) {
24 return size + (kAlignment - (size % kAlignment)) % kAlignment; 17 return size + (kAlignment - (size % kAlignment)) % kAlignment;
25 } 18 }
26 19
27 function getInt64(dataView, byteOffset, value) {
28 var lo, hi;
29 if (kHostIsLittleEndian) {
30 lo = dataView.getUint32(byteOffset, kHostIsLittleEndian);
31 hi = dataView.getInt32(byteOffset + 4, kHostIsLittleEndian);
32 } else {
33 hi = dataView.getInt32(byteOffset, kHostIsLittleEndian);
34 lo = dataView.getUint32(byteOffset + 4, kHostIsLittleEndian);
35 }
36 return lo + hi * kHighWordMultiplier;
37 }
38
39 function getUint64(dataView, byteOffset, value) {
40 var lo, hi;
41 if (kHostIsLittleEndian) {
42 lo = dataView.getUint32(byteOffset, kHostIsLittleEndian);
43 hi = dataView.getUint32(byteOffset + 4, kHostIsLittleEndian);
44 } else {
45 hi = dataView.getUint32(byteOffset, kHostIsLittleEndian);
46 lo = dataView.getUint32(byteOffset + 4, kHostIsLittleEndian);
47 }
48 return lo + hi * kHighWordMultiplier;
49 }
50
51 function setInt64(dataView, byteOffset, value) {
52 var hi = Math.floor(value / kHighWordMultiplier);
53 if (kHostIsLittleEndian) {
54 dataView.setInt32(byteOffset, value, kHostIsLittleEndian);
55 dataView.setInt32(byteOffset + 4, hi, kHostIsLittleEndian);
56 } else {
57 dataView.setInt32(byteOffset, hi, kHostIsLittleEndian);
58 dataView.setInt32(byteOffset + 4, value, kHostIsLittleEndian);
59 }
60 }
61
62 function setUint64(dataView, byteOffset, value) {
63 var hi = (value / kHighWordMultiplier) | 0;
64 if (kHostIsLittleEndian) {
65 dataView.setInt32(byteOffset, value, kHostIsLittleEndian);
66 dataView.setInt32(byteOffset + 4, hi, kHostIsLittleEndian);
67 } else {
68 dataView.setInt32(byteOffset, hi, kHostIsLittleEndian);
69 dataView.setInt32(byteOffset + 4, value, kHostIsLittleEndian);
70 }
71 }
72
73 function copyArrayBuffer(dstArrayBuffer, srcArrayBuffer) {
74 (new Uint8Array(dstArrayBuffer)).set(new Uint8Array(srcArrayBuffer));
75 }
76
77 // Buffer -------------------------------------------------------------------
78
79 function Buffer(sizeOrArrayBuffer) {
80 if (sizeOrArrayBuffer instanceof ArrayBuffer) {
81 this.arrayBuffer = sizeOrArrayBuffer;
82 } else {
83 this.arrayBuffer = new ArrayBuffer(sizeOrArrayBuffer);
84 };
85
86 this.dataView = new DataView(this.arrayBuffer);
87 this.next = 0;
88 }
89
90 Buffer.prototype.alloc = function(size) {
91 var pointer = this.next;
92 this.next += size;
93 if (this.next > this.arrayBuffer.byteLength) {
94 var newSize = (1.5 * (this.arrayBuffer.byteLength + size)) | 0;
95 this.grow(newSize);
96 }
97 return pointer;
98 };
99
100 Buffer.prototype.grow = function(size) {
101 var newArrayBuffer = new ArrayBuffer(size);
102 copyArrayBuffer(newArrayBuffer, this.arrayBuffer);
103 this.arrayBuffer = newArrayBuffer;
104 this.dataView = new DataView(this.arrayBuffer);
105 };
106
107 Buffer.prototype.trim = function() {
108 this.arrayBuffer = this.arrayBuffer.slice(0, this.next);
109 this.dataView = new DataView(this.arrayBuffer);
110 };
111
112 // Constants ---------------------------------------------------------------- 20 // Constants ----------------------------------------------------------------
113 21
114 var kArrayHeaderSize = 8; 22 var kArrayHeaderSize = 8;
115 var kStructHeaderSize = 8; 23 var kStructHeaderSize = 8;
116 var kMessageHeaderSize = 16; 24 var kMessageHeaderSize = 16;
117 var kMessageWithRequestIDHeaderSize = 24; 25 var kMessageWithRequestIDHeaderSize = 24;
118 26
119 // Decoder ------------------------------------------------------------------ 27 // Decoder ------------------------------------------------------------------
120 28
121 function Decoder(buffer, handles, base) { 29 function Decoder(buffer, handles, base) {
122 this.buffer = buffer; 30 this.buffer = buffer;
123 this.handles = handles; 31 this.handles = handles;
124 this.base = base; 32 this.base = base;
125 this.next = base; 33 this.next = base;
126 } 34 }
127 35
128 Decoder.prototype.skip = function(offset) { 36 Decoder.prototype.skip = function(offset) {
129 this.next += offset; 37 this.next += offset;
130 }; 38 };
131 39
132 Decoder.prototype.readInt8 = function() { 40 Decoder.prototype.readInt8 = function() {
133 var result = this.buffer.dataView.getInt8(this.next, kHostIsLittleEndian); 41 var result = this.buffer.getInt8(this.next);
134 this.next += 1; 42 this.next += 1;
135 return result; 43 return result;
136 }; 44 };
137 45
138 Decoder.prototype.readUint8 = function() { 46 Decoder.prototype.readUint8 = function() {
139 var result = this.buffer.dataView.getUint8(this.next, kHostIsLittleEndian); 47 var result = this.buffer.getUint8(this.next);
140 this.next += 1; 48 this.next += 1;
141 return result; 49 return result;
142 }; 50 };
143 51
144 Decoder.prototype.readInt16 = function() { 52 Decoder.prototype.readInt16 = function() {
145 var result = this.buffer.dataView.getInt16(this.next, kHostIsLittleEndian); 53 var result = this.buffer.getInt16(this.next);
146 this.next += 2; 54 this.next += 2;
147 return result; 55 return result;
148 }; 56 };
149 57
150 Decoder.prototype.readUint16 = function() { 58 Decoder.prototype.readUint16 = function() {
151 var result = this.buffer.dataView.getUint16(this.next, kHostIsLittleEndian); 59 var result = this.buffer.getUint16(this.next);
152 this.next += 2; 60 this.next += 2;
153 return result; 61 return result;
154 }; 62 };
155 63
156 Decoder.prototype.readInt32 = function() { 64 Decoder.prototype.readInt32 = function() {
157 var result = this.buffer.dataView.getInt32(this.next, kHostIsLittleEndian); 65 var result = this.buffer.getInt32(this.next);
158 this.next += 4; 66 this.next += 4;
159 return result; 67 return result;
160 }; 68 };
161 69
162 Decoder.prototype.readUint32 = function() { 70 Decoder.prototype.readUint32 = function() {
163 var result = this.buffer.dataView.getUint32(this.next, kHostIsLittleEndian); 71 var result = this.buffer.getUint32(this.next);
164 this.next += 4; 72 this.next += 4;
165 return result; 73 return result;
166 }; 74 };
167 75
168 Decoder.prototype.readInt64 = function() { 76 Decoder.prototype.readInt64 = function() {
169 var result = getInt64(this.buffer.dataView, this.next, kHostIsLittleEndian); 77 var result = this.buffer.getInt64(this.next);
170 this.next += 8; 78 this.next += 8;
171 return result; 79 return result;
172 }; 80 };
173 81
174 Decoder.prototype.readUint64 = function() { 82 Decoder.prototype.readUint64 = function() {
175 var result = getUint64( 83 var result = this.buffer.getUint64(this.next);
176 this.buffer.dataView, this.next, kHostIsLittleEndian);
177 this.next += 8; 84 this.next += 8;
178 return result; 85 return result;
179 }; 86 };
180 87
181 Decoder.prototype.readFloat = function() { 88 Decoder.prototype.readFloat = function() {
182 var result = this.buffer.dataView.getFloat32( 89 var result = this.buffer.getFloat32(this.next);
183 this.next, kHostIsLittleEndian);
184 this.next += 4; 90 this.next += 4;
185 return result; 91 return result;
186 }; 92 };
187 93
188 Decoder.prototype.readDouble = function() { 94 Decoder.prototype.readDouble = function() {
189 var result = this.buffer.dataView.getFloat64( 95 var result = this.buffer.getFloat64(this.next);
190 this.next, kHostIsLittleEndian);
191 this.next += 8; 96 this.next += 8;
192 return result; 97 return result;
193 }; 98 };
194 99
195 Decoder.prototype.decodePointer = function() { 100 Decoder.prototype.decodePointer = function() {
196 // TODO(abarth): To correctly decode a pointer, we need to know the real 101 // TODO(abarth): To correctly decode a pointer, we need to know the real
197 // base address of the array buffer. 102 // base address of the array buffer.
198 var offsetPointer = this.next; 103 var offsetPointer = this.next;
199 var offset = this.readUint64(); 104 var offset = this.readUint64();
200 if (!offset) 105 if (!offset)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 this.handles = handles; 191 this.handles = handles;
287 this.base = base; 192 this.base = base;
288 this.next = base; 193 this.next = base;
289 } 194 }
290 195
291 Encoder.prototype.skip = function(offset) { 196 Encoder.prototype.skip = function(offset) {
292 this.next += offset; 197 this.next += offset;
293 }; 198 };
294 199
295 Encoder.prototype.writeInt8 = function(val) { 200 Encoder.prototype.writeInt8 = function(val) {
296 // NOTE: Endianness doesn't come into play for single bytes. 201 this.buffer.setInt8(this.next, val);
297 this.buffer.dataView.setInt8(this.next, val);
298 this.next += 1; 202 this.next += 1;
299 }; 203 };
300 204
301 Encoder.prototype.writeUint8 = function(val) { 205 Encoder.prototype.writeUint8 = function(val) {
302 if (val < 0) { 206 if (val < 0) {
303 throw new Error(kErrorUnsigned); 207 throw new Error(kErrorUnsigned);
304 } 208 }
305 // NOTE: Endianness doesn't come into play for single bytes. 209 this.buffer.setUint8(this.next, val);
306 this.buffer.dataView.setUint8(this.next, val);
307 this.next += 1; 210 this.next += 1;
308 }; 211 };
309 212
310 Encoder.prototype.writeInt16 = function(val) { 213 Encoder.prototype.writeInt16 = function(val) {
311 this.buffer.dataView.setInt16(this.next, val, kHostIsLittleEndian); 214 this.buffer.setInt16(this.next, val);
312 this.next += 2; 215 this.next += 2;
313 }; 216 };
314 217
315 Encoder.prototype.writeUint16 = function(val) { 218 Encoder.prototype.writeUint16 = function(val) {
316 if (val < 0) { 219 if (val < 0) {
317 throw new Error(kErrorUnsigned); 220 throw new Error(kErrorUnsigned);
318 } 221 }
319 this.buffer.dataView.setUint16(this.next, val, kHostIsLittleEndian); 222 this.buffer.setUint16(this.next, val);
320 this.next += 2; 223 this.next += 2;
321 }; 224 };
322 225
323 Encoder.prototype.writeInt32 = function(val) { 226 Encoder.prototype.writeInt32 = function(val) {
324 this.buffer.dataView.setInt32(this.next, val, kHostIsLittleEndian); 227 this.buffer.setInt32(this.next, val);
325 this.next += 4; 228 this.next += 4;
326 }; 229 };
327 230
328 Encoder.prototype.writeUint32 = function(val) { 231 Encoder.prototype.writeUint32 = function(val) {
329 if (val < 0) { 232 if (val < 0) {
330 throw new Error(kErrorUnsigned); 233 throw new Error(kErrorUnsigned);
331 } 234 }
332 this.buffer.dataView.setUint32(this.next, val, kHostIsLittleEndian); 235 this.buffer.setUint32(this.next, val);
333 this.next += 4; 236 this.next += 4;
334 }; 237 };
335 238
336 Encoder.prototype.writeInt64 = function(val) { 239 Encoder.prototype.writeInt64 = function(val) {
337 setInt64(this.buffer.dataView, this.next, val); 240 this.buffer.setInt64(this.next, val);
338 this.next += 8; 241 this.next += 8;
339 }; 242 };
340 243
341 Encoder.prototype.writeUint64 = function(val) { 244 Encoder.prototype.writeUint64 = function(val) {
342 if (val < 0) { 245 if (val < 0) {
343 throw new Error(kErrorUnsigned); 246 throw new Error(kErrorUnsigned);
344 } 247 }
345 setUint64(this.buffer.dataView, this.next, val); 248 this.buffer.setUint64(this.next, val);
346 this.next += 8; 249 this.next += 8;
347 }; 250 };
348 251
349 Encoder.prototype.writeFloat = function(val) { 252 Encoder.prototype.writeFloat = function(val) {
350 this.buffer.dataView.setFloat32(this.next, val, kHostIsLittleEndian); 253 this.buffer.setFloat32(this.next, val);
351 this.next += 4; 254 this.next += 4;
352 }; 255 };
353 256
354 Encoder.prototype.writeDouble = function(val) { 257 Encoder.prototype.writeDouble = function(val) {
355 this.buffer.dataView.setFloat64(this.next, val, kHostIsLittleEndian); 258 this.buffer.setFloat64(this.next, val);
356 this.next += 8; 259 this.next += 8;
357 }; 260 };
358 261
359 Encoder.prototype.encodePointer = function(pointer) { 262 Encoder.prototype.encodePointer = function(pointer) {
360 if (!pointer) 263 if (!pointer)
361 return this.writeUint64(0); 264 return this.writeUint64(0);
362 // TODO(abarth): To correctly encode a pointer, we need to know the real 265 // TODO(abarth): To correctly encode a pointer, we need to know the real
363 // base address of the array buffer. 266 // base address of the array buffer.
364 var offset = pointer - this.next; 267 var offset = pointer - this.next;
365 this.writeUint64(offset); 268 this.writeUint64(offset);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // Skip over num_bytes, num_fields, message_name, and flags. 361 // Skip over num_bytes, num_fields, message_name, and flags.
459 var kRequestIDOffset = 4 + 4 + 4 + 4; 362 var kRequestIDOffset = 4 + 4 + 4 + 4;
460 363
461 function Message(buffer, handles) { 364 function Message(buffer, handles) {
462 this.buffer = buffer; 365 this.buffer = buffer;
463 this.handles = handles; 366 this.handles = handles;
464 } 367 }
465 368
466 Message.prototype.setRequestID = function(requestID) { 369 Message.prototype.setRequestID = function(requestID) {
467 // TODO(darin): Verify that space was reserved for this field! 370 // TODO(darin): Verify that space was reserved for this field!
468 setUint64(this.buffer.dataView, kRequestIDOffset, requestID); 371 this.buffer.setUint64(kRequestIDOffset, requestID);
469 }; 372 };
470 373
471 Message.prototype.getFlags = function() { 374 Message.prototype.getFlags = function() {
472 return this.buffer.dataView.getUint32(kFlagsOffset, kHostIsLittleEndian); 375 return this.buffer.getUint32(kFlagsOffset);
473 }; 376 };
474 377
475 // MessageBuilder ----------------------------------------------------------- 378 // MessageBuilder -----------------------------------------------------------
476 379
477 function MessageBuilder(messageName, payloadSize) { 380 function MessageBuilder(messageName, payloadSize) {
478 // Currently, we don't compute the payload size correctly ahead of time. 381 // Currently, we don't compute the payload size correctly ahead of time.
479 // Instead, we resize the buffer at the end. 382 // Instead, we resize the buffer at the end.
480 var numberOfBytes = kMessageHeaderSize + payloadSize; 383 var numberOfBytes = kMessageHeaderSize + payloadSize;
481 this.buffer = new Buffer(numberOfBytes); 384 this.buffer = new buffer.Buffer(numberOfBytes);
482 this.handles = []; 385 this.handles = [];
483 var encoder = this.createEncoder(kMessageHeaderSize); 386 var encoder = this.createEncoder(kMessageHeaderSize);
484 encoder.writeUint32(kMessageHeaderSize); 387 encoder.writeUint32(kMessageHeaderSize);
485 encoder.writeUint32(2); // num_fields. 388 encoder.writeUint32(2); // num_fields.
486 encoder.writeUint32(messageName); 389 encoder.writeUint32(messageName);
487 encoder.writeUint32(0); // flags. 390 encoder.writeUint32(0); // flags.
488 } 391 }
489 392
490 MessageBuilder.prototype.createEncoder = function(size) { 393 MessageBuilder.prototype.createEncoder = function(size) {
491 var pointer = this.buffer.alloc(size); 394 var pointer = this.buffer.alloc(size);
(...skipping 15 matching lines...) Expand all
507 return message; 410 return message;
508 }; 411 };
509 412
510 // MessageWithRequestIDBuilder ----------------------------------------------- 413 // MessageWithRequestIDBuilder -----------------------------------------------
511 414
512 function MessageWithRequestIDBuilder(messageName, payloadSize, flags, 415 function MessageWithRequestIDBuilder(messageName, payloadSize, flags,
513 requestID) { 416 requestID) {
514 // Currently, we don't compute the payload size correctly ahead of time. 417 // Currently, we don't compute the payload size correctly ahead of time.
515 // Instead, we resize the buffer at the end. 418 // Instead, we resize the buffer at the end.
516 var numberOfBytes = kMessageWithRequestIDHeaderSize + payloadSize; 419 var numberOfBytes = kMessageWithRequestIDHeaderSize + payloadSize;
517 this.buffer = new Buffer(numberOfBytes); 420 this.buffer = new buffer.Buffer(numberOfBytes);
518 this.handles = []; 421 this.handles = [];
519 var encoder = this.createEncoder(kMessageWithRequestIDHeaderSize); 422 var encoder = this.createEncoder(kMessageWithRequestIDHeaderSize);
520 encoder.writeUint32(kMessageWithRequestIDHeaderSize); 423 encoder.writeUint32(kMessageWithRequestIDHeaderSize);
521 encoder.writeUint32(3); // num_fields. 424 encoder.writeUint32(3); // num_fields.
522 encoder.writeUint32(messageName); 425 encoder.writeUint32(messageName);
523 encoder.writeUint32(flags); 426 encoder.writeUint32(flags);
524 encoder.writeUint64(requestID); 427 encoder.writeUint64(requestID);
525 } 428 }
526 429
527 MessageWithRequestIDBuilder.prototype = 430 MessageWithRequestIDBuilder.prototype =
528 Object.create(MessageBuilder.prototype); 431 Object.create(MessageBuilder.prototype);
529 432
530 MessageWithRequestIDBuilder.prototype.constructor = 433 MessageWithRequestIDBuilder.prototype.constructor =
531 MessageWithRequestIDBuilder; 434 MessageWithRequestIDBuilder;
532 435
533 // MessageReader ------------------------------------------------------------ 436 // MessageReader ------------------------------------------------------------
534 437
535 function MessageReader(message) { 438 function MessageReader(message) {
536 this.decoder = new Decoder(message.buffer, message.handles, 0); 439 this.decoder = new Decoder(message.buffer, message.handles, 0);
537 var messageHeaderSize = this.decoder.readUint32(); 440 var messageHeaderSize = this.decoder.readUint32();
538 this.payloadSize = 441 this.payloadSize = message.buffer.byteLength - messageHeaderSize;
539 message.buffer.arrayBuffer.byteLength - messageHeaderSize;
540 var numFields = this.decoder.readUint32(); 442 var numFields = this.decoder.readUint32();
541 this.messageName = this.decoder.readUint32(); 443 this.messageName = this.decoder.readUint32();
542 this.flags = this.decoder.readUint32(); 444 this.flags = this.decoder.readUint32();
543 if (numFields >= 3) 445 if (numFields >= 3)
544 this.requestID = this.decoder.readUint64(); 446 this.requestID = this.decoder.readUint64();
545 this.decoder.skip(messageHeaderSize - this.decoder.next); 447 this.decoder.skip(messageHeaderSize - this.decoder.next);
546 } 448 }
547 449
548 MessageReader.prototype.decodeStruct = function(cls) { 450 MessageReader.prototype.decodeStruct = function(cls) {
549 return cls.decode(this.decoder); 451 return cls.decode(this.decoder);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 Handle.decode = function(decoder) { 659 Handle.decode = function(decoder) {
758 return decoder.decodeHandle(); 660 return decoder.decodeHandle();
759 }; 661 };
760 662
761 Handle.encode = function(encoder, val) { 663 Handle.encode = function(encoder, val) {
762 encoder.encodeHandle(val); 664 encoder.encodeHandle(val);
763 }; 665 };
764 666
765 var exports = {}; 667 var exports = {};
766 exports.align = align; 668 exports.align = align;
767 exports.Buffer = Buffer;
768 exports.Message = Message; 669 exports.Message = Message;
769 exports.MessageBuilder = MessageBuilder; 670 exports.MessageBuilder = MessageBuilder;
770 exports.MessageWithRequestIDBuilder = MessageWithRequestIDBuilder; 671 exports.MessageWithRequestIDBuilder = MessageWithRequestIDBuilder;
771 exports.MessageReader = MessageReader; 672 exports.MessageReader = MessageReader;
772 exports.kArrayHeaderSize = kArrayHeaderSize; 673 exports.kArrayHeaderSize = kArrayHeaderSize;
773 exports.kStructHeaderSize = kStructHeaderSize; 674 exports.kStructHeaderSize = kStructHeaderSize;
774 exports.kMessageHeaderSize = kMessageHeaderSize; 675 exports.kMessageHeaderSize = kMessageHeaderSize;
775 exports.kMessageExpectsResponse = kMessageExpectsResponse; 676 exports.kMessageExpectsResponse = kMessageExpectsResponse;
776 exports.kMessageIsResponse = kMessageIsResponse; 677 exports.kMessageIsResponse = kMessageIsResponse;
777 exports.Int8 = Int8; 678 exports.Int8 = Int8;
778 exports.Uint8 = Uint8; 679 exports.Uint8 = Uint8;
779 exports.Int16 = Int16; 680 exports.Int16 = Int16;
780 exports.Uint16 = Uint16; 681 exports.Uint16 = Uint16;
781 exports.Int32 = Int32; 682 exports.Int32 = Int32;
782 exports.Uint32 = Uint32; 683 exports.Uint32 = Uint32;
783 exports.Int64 = Int64; 684 exports.Int64 = Int64;
784 exports.Uint64 = Uint64; 685 exports.Uint64 = Uint64;
785 exports.Float = Float; 686 exports.Float = Float;
786 exports.Double = Double; 687 exports.Double = Double;
787 exports.String = String; 688 exports.String = String;
788 exports.PointerTo = PointerTo; 689 exports.PointerTo = PointerTo;
789 exports.ArrayOf = ArrayOf; 690 exports.ArrayOf = ArrayOf;
790 exports.ArrayOfBoolArrayPointers = ArrayOfBoolArrayPointers; 691 exports.ArrayOfBoolArrayPointers = ArrayOfBoolArrayPointers;
791 exports.Handle = Handle; 692 exports.Handle = Handle;
792 return exports; 693 return exports;
793 }); 694 });
OLDNEW
« no previous file with comments | « mojo/public/js/bindings/buffer.js ('k') | mojo/public/js/bindings/codec_unittests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698