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

Side by Side Diff: include/v8.h

Issue 1041403003: Expose an API on ArrayBufferView to copy out content w/o changing the buffer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 8 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
« no previous file with comments | « no previous file | src/api.cc » ('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 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 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 Local<ArrayBuffer> Buffer(); 3475 Local<ArrayBuffer> Buffer();
3476 /** 3476 /**
3477 * Byte offset in |Buffer|. 3477 * Byte offset in |Buffer|.
3478 */ 3478 */
3479 size_t ByteOffset(); 3479 size_t ByteOffset();
3480 /** 3480 /**
3481 * Size of a view in bytes. 3481 * Size of a view in bytes.
3482 */ 3482 */
3483 size_t ByteLength(); 3483 size_t ByteLength();
3484 3484
3485 /**
3486 * Copy the contents of the ArrayBufferView's buffer to an embedder defined
3487 * memory without additional overhead that calling ArrayBufferView::Buffer
3488 * might incur.
3489 *
3490 * Will write at most min(|byte_length|, ByteLength) bytes starting at
3491 * ByteOffset of the underling buffer to the memory starting at |dest|.
3492 * Returns the number of bytes actually written.
3493 */
3494 size_t CopyContents(void* dest, size_t byte_length);
3495
3485 V8_INLINE static ArrayBufferView* Cast(Value* obj); 3496 V8_INLINE static ArrayBufferView* Cast(Value* obj);
3486 3497
3487 static const int kInternalFieldCount = 3498 static const int kInternalFieldCount =
3488 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; 3499 V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT;
3489 3500
3490 private: 3501 private:
3491 ArrayBufferView(); 3502 ArrayBufferView();
3492 static void CheckCast(Value* obj); 3503 static void CheckCast(Value* obj);
3493 }; 3504 };
3494 3505
(...skipping 4564 matching lines...) Expand 10 before | Expand all | Expand 10 after
8059 */ 8070 */
8060 8071
8061 8072
8062 } // namespace v8 8073 } // namespace v8
8063 8074
8064 8075
8065 #undef TYPE_CHECK 8076 #undef TYPE_CHECK
8066 8077
8067 8078
8068 #endif // V8_H_ 8079 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698