OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project 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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 3425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3436 Local<ArrayBuffer> Buffer(); | 3436 Local<ArrayBuffer> Buffer(); |
3437 /** | 3437 /** |
3438 * Byte offset in |Buffer|. | 3438 * Byte offset in |Buffer|. |
3439 */ | 3439 */ |
3440 size_t ByteOffset(); | 3440 size_t ByteOffset(); |
3441 /** | 3441 /** |
3442 * Size of a view in bytes. | 3442 * Size of a view in bytes. |
3443 */ | 3443 */ |
3444 size_t ByteLength(); | 3444 size_t ByteLength(); |
3445 | 3445 |
| 3446 /** |
| 3447 * Copy the contents of the ArrayBufferView's buffer to an embedder defined |
| 3448 * memory without additional overhead that calling ArrayBufferView::Buffer |
| 3449 * might incur. |
| 3450 * |
| 3451 * Will write at most min(|byte_length|, ByteLength) bytes starting at |
| 3452 * ByteOffset of the underling buffer to the memory starting at |dest|. |
| 3453 * Returns the number of bytes actually written. |
| 3454 */ |
| 3455 size_t CopyContents(void* dest, size_t byte_length); |
| 3456 |
3446 V8_INLINE static ArrayBufferView* Cast(Value* obj); | 3457 V8_INLINE static ArrayBufferView* Cast(Value* obj); |
3447 | 3458 |
3448 static const int kInternalFieldCount = | 3459 static const int kInternalFieldCount = |
3449 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; | 3460 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; |
3450 | 3461 |
3451 private: | 3462 private: |
3452 ArrayBufferView(); | 3463 ArrayBufferView(); |
3453 static void CheckCast(Value* obj); | 3464 static void CheckCast(Value* obj); |
3454 }; | 3465 }; |
3455 | 3466 |
(...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8014 */ | 8025 */ |
8015 | 8026 |
8016 | 8027 |
8017 } // namespace v8 | 8028 } // namespace v8 |
8018 | 8029 |
8019 | 8030 |
8020 #undef TYPE_CHECK | 8031 #undef TYPE_CHECK |
8021 | 8032 |
8022 | 8033 |
8023 #endif // V8_H_ | 8034 #endif // V8_H_ |
OLD | NEW |