diff options
Diffstat (limited to 'deps/v8/test/cctest/test-typedarrays.cc')
-rw-r--r-- | deps/v8/test/cctest/test-typedarrays.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/deps/v8/test/cctest/test-typedarrays.cc b/deps/v8/test/cctest/test-typedarrays.cc index fb4740cb92..5e715b75e0 100644 --- a/deps/v8/test/cctest/test-typedarrays.cc +++ b/deps/v8/test/cctest/test-typedarrays.cc @@ -7,6 +7,7 @@ #include "src/init/v8.h" #include "test/cctest/cctest.h" +#include "src/execution/protectors-inl.h" #include "src/heap/heap.h" #include "src/objects/objects-inl.h" #include "src/objects/objects.h" @@ -14,12 +15,11 @@ namespace v8 { namespace internal { -void TestArrayBufferViewContents( - LocalContext& env, // NOLINT(runtime/references) - bool should_use_buffer) { +void TestArrayBufferViewContents(LocalContext* env, bool should_use_buffer) { v8::Local<v8::Object> obj_a = v8::Local<v8::Object>::Cast( - env->Global() - ->Get(env->GetIsolate()->GetCurrentContext(), v8_str("a")) + (*env) + ->Global() + ->Get((*env)->GetIsolate()->GetCurrentContext(), v8_str("a")) .ToLocalChecked()); CHECK(obj_a->IsArrayBufferView()); v8::Local<v8::ArrayBufferView> array_buffer_view = @@ -43,7 +43,7 @@ TEST(CopyContentsTypedArray) { "a[1] = 1;" "a[2] = 2;" "a[3] = 3;"); - TestArrayBufferViewContents(env, false); + TestArrayBufferViewContents(&env, false); } @@ -51,7 +51,7 @@ TEST(CopyContentsArray) { LocalContext env; v8::HandleScope scope(env->GetIsolate()); CompileRun("var a = new Uint8Array([0, 1, 2, 3]);"); - TestArrayBufferViewContents(env, false); + TestArrayBufferViewContents(&env, false); } @@ -68,7 +68,7 @@ TEST(CopyContentsView) { "c[4] = 2;" "c[5] = 3;" "var a = new DataView(b, 2);"); - TestArrayBufferViewContents(env, true); + TestArrayBufferViewContents(&env, true); } @@ -82,7 +82,7 @@ TEST(AllocateNotExternal) { v8::ArrayBuffer::New(env->GetIsolate(), memory, 1024, v8::ArrayBufferCreationMode::kInternalized); CHECK(!buffer->IsExternal()); - CHECK_EQ(memory, buffer->GetContents().Data()); + CHECK_EQ(memory, buffer->GetBackingStore()->Data()); } void TestSpeciesProtector(char* code, @@ -115,12 +115,12 @@ void TestSpeciesProtector(char* code, v8::internal::Isolate* i_isolate = reinterpret_cast<v8::internal::Isolate*>(isolate); - CHECK(i_isolate->IsTypedArraySpeciesLookupChainIntact()); + CHECK(Protectors::IsTypedArraySpeciesLookupChainIntact(i_isolate)); CompileRun(code); if (invalidates_species_protector) { - CHECK(!i_isolate->IsTypedArraySpeciesLookupChainIntact()); + CHECK(!Protectors::IsTypedArraySpeciesLookupChainIntact(i_isolate)); } else { - CHECK(i_isolate->IsTypedArraySpeciesLookupChainIntact()); + CHECK(Protectors::IsTypedArraySpeciesLookupChainIntact(i_isolate)); } v8::Local<v8::Value> my_typed_array = CompileRun("MyTypedArray"); |