Index: src/v8.h |
diff --git a/src/v8.h b/src/v8.h |
index cd25dc76ea46edf52d372852cc530a6c750f8ccc..72fad6b1f52311217cf9ef6486e3a1ded07c3f2a 100644 |
--- a/src/v8.h |
+++ b/src/v8.h |
@@ -121,6 +121,15 @@ class V8 : public AllStatic { |
static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
static void FireCallCompletedCallback(Isolate* isolate); |
+ static v8::ArrayBuffer::Allocator* ArrayBufferAllocator() { |
+ return array_buffer_allocator_; |
+ } |
+ |
+ static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { |
+ CHECK(array_buffer_allocator_ == NULL); |
Sven Panne
2013/06/11 09:54:37
CHECK_EQ(NULL, array_buffer_allocator_);
Dmitry Lomov (no reviews)
2013/06/11 10:40:09
Done.
|
+ array_buffer_allocator_ = allocator; |
+ } |
+ |
private: |
static void InitializeOncePerProcessImpl(); |
static void InitializeOncePerProcess(); |
@@ -139,6 +148,8 @@ class V8 : public AllStatic { |
static bool use_crankshaft_; |
// List of callbacks when a Call completes. |
static List<CallCompletedCallback>* call_completed_callbacks_; |
+ // Allocator for external array buffers. |
+ static v8::ArrayBuffer::Allocator* array_buffer_allocator_; |
}; |