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

Unified Diff: include/v8.h

Issue 768543002: [WIP] TrapHandler 2014/11/27. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « BUILD.gn ('k') | samples/shell.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 e6c97cc82699be5cad201b237c5c24f0f7b13303..4df8c85cb7eab90f96cc9048d88a86711067e49e 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2944,11 +2944,25 @@ class V8_EXPORT ArrayBuffer : public Object {
* Memory does not have to be initialized.
*/
virtual void* AllocateUninitialized(size_t length) = 0;
+
+ /**
+ * Allocate |length| bytes. Return NULL if allocation is not successful,
+ * otherwise return a pointer that is a multiple of |alignment|. Memory
+ * does not have to be initialized.
+ */
+ virtual void* Allocate(size_t length, size_t alignment) { return NULL; }
+
/**
* 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;
+
+ /**
+ * Free the memory block pointed to by |data|. That memory is guaranteed
+ * to be previously allocated by |Allocate|.
+ */
+ virtual void Free(void* data) {}
};
/**
« no previous file with comments | « BUILD.gn ('k') | samples/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698