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 3493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3504 * Copy the contents of the ArrayBufferView's buffer to an embedder defined | 3504 * Copy the contents of the ArrayBufferView's buffer to an embedder defined |
3505 * memory without additional overhead that calling ArrayBufferView::Buffer | 3505 * memory without additional overhead that calling ArrayBufferView::Buffer |
3506 * might incur. | 3506 * might incur. |
3507 * | 3507 * |
3508 * Will write at most min(|byte_length|, ByteLength) bytes starting at | 3508 * Will write at most min(|byte_length|, ByteLength) bytes starting at |
3509 * ByteOffset of the underling buffer to the memory starting at |dest|. | 3509 * ByteOffset of the underling buffer to the memory starting at |dest|. |
3510 * Returns the number of bytes actually written. | 3510 * Returns the number of bytes actually written. |
3511 */ | 3511 */ |
3512 size_t CopyContents(void* dest, size_t byte_length); | 3512 size_t CopyContents(void* dest, size_t byte_length); |
3513 | 3513 |
3514 /** | |
3515 * Returns true if ArrayBufferView::Buffer() is a no-op. If it returns false, | |
Dmitry Lomov (no reviews)
2015/04/13 08:46:08
'no-op' is a bad explanation of what 'Buffer' does
| |
3516 * getting the buffer might incur allocating a backing store and materializing | |
3517 * the contents. In that case, CopyContents can be used to access the | |
3518 * underlying contents of this ArrayBufferView without materializing the | |
3519 * buffer first. | |
3520 */ | |
3521 bool HasBuffer() const; | |
3522 | |
3514 V8_INLINE static ArrayBufferView* Cast(Value* obj); | 3523 V8_INLINE static ArrayBufferView* Cast(Value* obj); |
3515 | 3524 |
3516 static const int kInternalFieldCount = | 3525 static const int kInternalFieldCount = |
3517 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; | 3526 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; |
3518 | 3527 |
3519 private: | 3528 private: |
3520 ArrayBufferView(); | 3529 ArrayBufferView(); |
3521 static void CheckCast(Value* obj); | 3530 static void CheckCast(Value* obj); |
3522 }; | 3531 }; |
3523 | 3532 |
(...skipping 4562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8086 */ | 8095 */ |
8087 | 8096 |
8088 | 8097 |
8089 } // namespace v8 | 8098 } // namespace v8 |
8090 | 8099 |
8091 | 8100 |
8092 #undef TYPE_CHECK | 8101 #undef TYPE_CHECK |
8093 | 8102 |
8094 | 8103 |
8095 #endif // V8_H_ | 8104 #endif // V8_H_ |
OLD | NEW |