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

Unified Diff: test/cctest/cctest.h

Issue 1116633002: Pass ArrayBuffer::Allocator via Isolate::CreateParams (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « src/snapshot/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « src/snapshot/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698