diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:39:11 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-11-08 15:46:25 +0100 |
commit | 6ca81ad72a3c6fdf16c683335be748f22aaa9a0d (patch) | |
tree | 33c8ee75f729aed76c2c0b89c63f9bf1b4dd66aa /deps/v8/test/cctest/test-typedarrays.cc | |
parent | 1eee0b8bf8bba39b600fb16a9223e545e3bac2bc (diff) | |
download | android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.gz android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.bz2 android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.zip |
deps: update V8 to 7.9.317.20
PR-URL: https://github.com/nodejs/node/pull/30020
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
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"); |