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

Unified Diff: include/v8.h

Issue 2101413002: Provide a convenience array buffer allocator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | samples/hello-world.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 7aad48b4daf2b78f26b8691f55061e478c925f8a..886ab465083e28d71b78b857e87030d5b3d1c779 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* NewDefaultAllocator();
};
/**
« no previous file with comments | « no previous file | samples/hello-world.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698