| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 3f568beb4a8f1404aae54804e886aa04c321ac6f..ad2b8e0d060e424c7c489bca5530320139d743fe 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -12141,6 +12141,7 @@ void SetFunctionEntryHookTest::RunTest() {
|
| v8::Isolate::CreateParams create_params;
|
| create_params.entry_hook = EntryHook;
|
| create_params.code_event_handler = JitEvent;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| v8::Isolate* isolate = v8::Isolate::New(create_params);
|
|
|
| {
|
| @@ -12163,7 +12164,9 @@ void SetFunctionEntryHookTest::RunTest() {
|
| Reset();
|
|
|
| // Make sure a second isolate is unaffected by the previous entry hook.
|
| - isolate = v8::Isolate::New();
|
| + create_params = v8::Isolate::CreateParams();
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + isolate = v8::Isolate::New(create_params);
|
| {
|
| v8::Isolate::Scope scope(isolate);
|
|
|
| @@ -12344,7 +12347,9 @@ UNINITIALIZED_TEST(SetJitCodeEventHandler) {
|
|
|
| // Run this test in a new isolate to make sure we don't
|
| // have remnants of state from other code.
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| isolate->Enter();
|
| i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| i::Heap* heap = i_isolate->heap();
|
| @@ -12400,7 +12405,7 @@ UNINITIALIZED_TEST(SetJitCodeEventHandler) {
|
| isolate->Dispose();
|
|
|
| // Do this in a new isolate.
|
| - isolate = v8::Isolate::New();
|
| + isolate = v8::Isolate::New(create_params);
|
| isolate->Enter();
|
|
|
| // Verify that we get callbacks for existing code objects when we
|
| @@ -15254,7 +15259,9 @@ TEST(VisitExternalStrings) {
|
|
|
| TEST(ExternalStringCollectedAtTearDown) {
|
| int destroyed = 0;
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| { v8::Isolate::Scope isolate_scope(isolate);
|
| v8::HandleScope handle_scope(isolate);
|
| const char* s = "One string to test them all, one string to find them.";
|
| @@ -15274,7 +15281,9 @@ TEST(ExternalStringCollectedAtTearDown) {
|
|
|
| TEST(ExternalInternalizedStringCollectedAtTearDown) {
|
| int destroyed = 0;
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| { v8::Isolate::Scope isolate_scope(isolate);
|
| LocalContext env(isolate);
|
| v8::HandleScope handle_scope(isolate);
|
| @@ -16515,7 +16524,9 @@ TEST(GCInFailedAccessCheckCallback) {
|
|
|
| TEST(IsolateNewDispose) {
|
| v8::Isolate* current_isolate = CcTest::isolate();
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| CHECK(isolate != NULL);
|
| CHECK(current_isolate != isolate);
|
| CHECK(current_isolate == CcTest::isolate());
|
| @@ -16529,7 +16540,9 @@ TEST(IsolateNewDispose) {
|
|
|
|
|
| UNINITIALIZED_TEST(DisposeIsolateWhenInUse) {
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| {
|
| v8::Isolate::Scope i_scope(isolate);
|
| v8::HandleScope scope(isolate);
|
| @@ -16548,7 +16561,9 @@ UNINITIALIZED_TEST(DisposeIsolateWhenInUse) {
|
|
|
|
|
| static void BreakArrayGuarantees(const char* script) {
|
| - v8::Isolate* isolate1 = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate1 = v8::Isolate::New(create_params);
|
| isolate1->Enter();
|
| v8::Persistent<v8::Context> context1;
|
| {
|
| @@ -16597,7 +16612,9 @@ TEST(VerifyArrayPrototypeGuarantees) {
|
|
|
| TEST(RunTwoIsolatesOnSingleThread) {
|
| // Run isolate 1.
|
| - v8::Isolate* isolate1 = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate1 = v8::Isolate::New(create_params);
|
| isolate1->Enter();
|
| v8::Persistent<v8::Context> context1;
|
| {
|
| @@ -16616,7 +16633,7 @@ TEST(RunTwoIsolatesOnSingleThread) {
|
| }
|
|
|
| // Run isolate 2.
|
| - v8::Isolate* isolate2 = v8::Isolate::New();
|
| + v8::Isolate* isolate2 = v8::Isolate::New(create_params);
|
| v8::Persistent<v8::Context> context2;
|
|
|
| {
|
| @@ -16741,7 +16758,9 @@ class IsolateThread : public v8::base::Thread {
|
| : Thread(Options("IsolateThread")), fib_limit_(fib_limit), result_(0) {}
|
|
|
| void Run() {
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| result_ = CalcFibonacci(isolate, fib_limit_);
|
| isolate->Dispose();
|
| }
|
| @@ -16778,7 +16797,9 @@ TEST(MultipleIsolatesOnIndividualThreads) {
|
|
|
|
|
| TEST(IsolateDifferentContexts) {
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| Local<v8::Context> context;
|
| {
|
| v8::Isolate::Scope isolate_scope(isolate);
|
| @@ -16818,6 +16839,7 @@ class InitDefaultIsolateThread : public v8::base::Thread {
|
|
|
| void Run() {
|
| v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| switch (testCase_) {
|
| case SetResourceConstraints: {
|
| create_params.constraints.set_max_semi_space_size(1);
|
| @@ -18264,7 +18286,9 @@ TEST(StaticGetters) {
|
|
|
| UNINITIALIZED_TEST(IsolateEmbedderData) {
|
| CcTest::DisableAutomaticDispose();
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| + v8::Isolate::CreateParams create_params;
|
| + create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| + v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| isolate->Enter();
|
| i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
|
|
|