Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 7aad48b4daf2b78f26b8691f55061e478c925f8a..e41633815a8253ce68ff8e5283a5426eb5ad403b 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -3487,8 +3487,6 @@ class V8_EXPORT ArrayBuffer : public Object { |
| * |
| * Note that it is unsafe to call back into V8 from any of the allocator |
| * functions. |
| - * |
| - * This API is experimental and may change significantly. |
| */ |
| class V8_EXPORT Allocator { // NOLINT |
| public: |
| @@ -3505,11 +3503,19 @@ class V8_EXPORT ArrayBuffer : public Object { |
| * Memory does not have to be initialized. |
| */ |
| virtual void* AllocateUninitialized(size_t length) = 0; |
| + |
| /** |
| * Free the memory block of size |length|, pointed to by |data|. |
| * That memory is guaranteed to be previously allocated by |Allocate|. |
| */ |
| virtual void Free(void* data, size_t length) = 0; |
| + |
| + /** |
| + * malloc/free based convenience allocator. |
| + * |
| + * Caller takes ownership. |
| + */ |
| + static Allocator* NewSimpleAllocator(); |
|
ulan
2016/06/28 15:15:40
Nit: can we call it NewDefaultAllocator? The word
|
| }; |
| /** |