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

Unified Diff: test/cctest/cctest.cc

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 | « test/cctest/cctest.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.cc
diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc
index 08fb01bc291860c01071bafd35f11b00ae01afd5..b5771ff6550681526cda8cd6a9a3c36411645482 100644
--- a/test/cctest/cctest.cc
+++ b/test/cctest/cctest.cc
@@ -52,6 +52,7 @@ static bool disable_automatic_dispose_ = false;
CcTest* CcTest::last_ = NULL;
bool CcTest::initialize_called_ = false;
v8::base::Atomic32 CcTest::isolate_used_ = 0;
+v8::ArrayBuffer::Allocator* CcTest::allocator_ = NULL;
v8::Isolate* CcTest::isolate_ = NULL;
@@ -88,7 +89,9 @@ void CcTest::Run() {
CHECK(initialization_state_ != kUnintialized);
initialization_state_ = kInitialized;
if (isolate_ == NULL) {
- isolate_ = v8::Isolate::New();
+ v8::Isolate::CreateParams create_params;
+ create_params.array_buffer_allocator = allocator_;
+ isolate_ = v8::Isolate::New(create_params);
}
isolate_->Enter();
}
@@ -175,7 +178,7 @@ int main(int argc, char* argv[]) {
#endif
CcTestArrayBufferAllocator array_buffer_allocator;
- v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
+ CcTest::set_array_buffer_allocator(&array_buffer_allocator);
i::PrintExtension print_extension;
v8::RegisterExtension(&print_extension);
« no previous file with comments | « test/cctest/cctest.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698