Chromium Code Reviews

Side by Side Diff: include/v8.h

Issue 1978773002: [api] Clarify expectations of ArrayBuffer::Allocator in API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « no previous file | no next file » | 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 3435 matching lines...)
3446 enum class ArrayBufferCreationMode { kInternalized, kExternalized }; 3446 enum class ArrayBufferCreationMode { kInternalized, kExternalized };
3447 3447
3448 3448
3449 /** 3449 /**
3450 * An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5). 3450 * An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5).
3451 * This API is experimental and may change significantly. 3451 * This API is experimental and may change significantly.
3452 */ 3452 */
3453 class V8_EXPORT ArrayBuffer : public Object { 3453 class V8_EXPORT ArrayBuffer : public Object {
3454 public: 3454 public:
3455 /** 3455 /**
3456 * Allocator that V8 uses to allocate |ArrayBuffer|'s memory. 3456 * A thread-safe allocator that V8 uses to allocate |ArrayBuffer|'s memory.
3457 * The allocator is a global V8 setting. It has to be set via 3457 * The allocator is a global V8 setting. It has to be set via
3458 * Isolate::CreateParams. 3458 * Isolate::CreateParams.
3459 * 3459 *
3460 * Memory allocated through this allocator is accounted for as external
jochen (gone - plz use gerrit) 2016/05/13 09:03:32 But just of it's allocated by v8? And who has to
Michael Lippautz 2016/05/13 09:11:22 Yes.
jochen (gone - plz use gerrit) 2016/05/13 09:15:03 Can you include all that in the comment?
Michael Lippautz 2016/05/13 09:26:44 Done.
3461 * memory by V8.
3462 *
3460 * This API is experimental and may change significantly. 3463 * This API is experimental and may change significantly.
3461 */ 3464 */
3462 class V8_EXPORT Allocator { // NOLINT 3465 class V8_EXPORT Allocator { // NOLINT
3463 public: 3466 public:
3464 virtual ~Allocator() {} 3467 virtual ~Allocator() {}
3465 3468
3466 /** 3469 /**
3467 * Allocate |length| bytes. Return NULL if allocation is not successful. 3470 * Allocate |length| bytes. Return NULL if allocation is not successful.
3468 * Memory should be initialized to zeroes. 3471 * Memory should be initialized to zeroes.
3469 */ 3472 */
(...skipping 5262 matching lines...)
8732 */ 8735 */
8733 8736
8734 8737
8735 } // namespace v8 8738 } // namespace v8
8736 8739
8737 8740
8738 #undef TYPE_CHECK 8741 #undef TYPE_CHECK
8739 8742
8740 8743
8741 #endif // INCLUDE_V8_H_ 8744 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine