Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2482 V8_INLINE(static ArrayBuffer* Cast(Value* obj)); | 2482 V8_INLINE(static ArrayBuffer* Cast(Value* obj)); |
| 2483 | 2483 |
| 2484 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; | 2484 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; |
| 2485 | 2485 |
| 2486 private: | 2486 private: |
| 2487 ArrayBuffer(); | 2487 ArrayBuffer(); |
| 2488 static void CheckCast(Value* obj); | 2488 static void CheckCast(Value* obj); |
| 2489 }; | 2489 }; |
| 2490 | 2490 |
| 2491 | 2491 |
| 2492 #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT | |
|
titzer
2013/07/05 08:09:57
I'm not sure why you conditionally define a macro
Dmitry Lomov (no reviews)
2013/07/05 09:56:02
The number of these external fields can vary from
| |
| 2493 #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2 | |
| 2494 #endif | |
| 2495 | |
| 2496 | |
| 2492 /** | 2497 /** |
| 2493 * A base class for an instance of one of "views" over ArrayBuffer, | 2498 * A base class for an instance of one of "views" over ArrayBuffer, |
| 2494 * including TypedArrays and DataView (ES6 draft 15.13). | 2499 * including TypedArrays and DataView (ES6 draft 15.13). |
| 2495 * | 2500 * |
| 2496 * This API is experimental and may change significantly. | 2501 * This API is experimental and may change significantly. |
| 2497 */ | 2502 */ |
| 2498 class V8EXPORT ArrayBufferView : public Object { | 2503 class V8EXPORT ArrayBufferView : public Object { |
| 2499 public: | 2504 public: |
| 2500 /** | 2505 /** |
| 2501 * Returns underlying ArrayBuffer. | 2506 * Returns underlying ArrayBuffer. |
| 2502 */ | 2507 */ |
| 2503 Local<ArrayBuffer> Buffer(); | 2508 Local<ArrayBuffer> Buffer(); |
| 2504 /** | 2509 /** |
| 2505 * Byte offset in |Buffer|. | 2510 * Byte offset in |Buffer|. |
| 2506 */ | 2511 */ |
| 2507 size_t ByteOffset(); | 2512 size_t ByteOffset(); |
| 2508 /** | 2513 /** |
| 2509 * Size of a view in bytes. | 2514 * Size of a view in bytes. |
| 2510 */ | 2515 */ |
| 2511 size_t ByteLength(); | 2516 size_t ByteLength(); |
| 2512 /** | 2517 /** |
| 2513 * Base address of a view. | 2518 * Base address of a view. |
| 2514 */ | 2519 */ |
| 2515 void* BaseAddress(); | 2520 void* BaseAddress(); |
| 2516 | 2521 |
| 2517 V8_INLINE(static ArrayBufferView* Cast(Value* obj)); | 2522 V8_INLINE(static ArrayBufferView* Cast(Value* obj)); |
| 2518 | 2523 |
| 2524 static const int kInternalFieldCount = | |
| 2525 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; | |
|
titzer
2013/07/05 08:09:57
BTW, where are these internal fields defined?
Dmitry Lomov (no reviews)
2013/07/05 09:56:02
I am not sure what the question is (the rest of th
| |
| 2526 | |
| 2519 private: | 2527 private: |
| 2520 ArrayBufferView(); | 2528 ArrayBufferView(); |
| 2521 static void CheckCast(Value* obj); | 2529 static void CheckCast(Value* obj); |
| 2522 }; | 2530 }; |
| 2523 | 2531 |
| 2524 | 2532 |
| 2525 /** | 2533 /** |
| 2526 * A base class for an instance of TypedArray series of constructors | 2534 * A base class for an instance of TypedArray series of constructors |
| 2527 * (ES6 draft 15.13.6). | 2535 * (ES6 draft 15.13.6). |
| 2528 * This API is experimental and may change significantly. | 2536 * This API is experimental and may change significantly. |
| (...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6465 | 6473 |
| 6466 | 6474 |
| 6467 } // namespace v8 | 6475 } // namespace v8 |
| 6468 | 6476 |
| 6469 | 6477 |
| 6470 #undef V8EXPORT | 6478 #undef V8EXPORT |
| 6471 #undef TYPE_CHECK | 6479 #undef TYPE_CHECK |
| 6472 | 6480 |
| 6473 | 6481 |
| 6474 #endif // V8_H_ | 6482 #endif // V8_H_ |
| OLD | NEW |