Index: test/cctest/cctest.h |
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h |
index 634552c6b26a9f769ce5cfcf534c24eeee908ff5..bade26308f35694e55a935b4f8e2f5d045a5c36f 100644 |
--- a/test/cctest/cctest.h |
+++ b/test/cctest/cctest.h |
@@ -145,6 +145,15 @@ class CcTest { |
return isolate()->GetCurrentContext()->Global(); |
} |
+ static v8::ArrayBuffer::Allocator* array_buffer_allocator() { |
+ return allocator_; |
+ } |
+ |
+ static void set_array_buffer_allocator( |
+ v8::ArrayBuffer::Allocator* allocator) { |
+ allocator_ = allocator; |
+ } |
+ |
// TODO(dcarney): Remove. |
// This must be called first in a test. |
static void InitializeVM() { |
@@ -178,6 +187,7 @@ class CcTest { |
bool initialize_; |
CcTest* prev_; |
static CcTest* last_; |
+ static v8::ArrayBuffer::Allocator* allocator_; |
static v8::Isolate* isolate_; |
static bool initialize_called_; |
static v8::base::Atomic32 isolate_used_; |