diff --git a/test/cctest/test-assembler-arm.cc b/test/cctest/test-assembler-arm.cc index 3c91d3a7fa..2a0dbb5a54 100644 --- a/test/cctest/test-assembler-arm.cc +++ b/test/cctest/test-assembler-arm.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include // NOLINT(readability/streams) #include "src/v8.h" diff --git a/test/cctest/test-assembler-arm64.cc b/test/cctest/test-assembler-arm64.cc index 7450a4375f..ac6d1538b6 100644 --- a/test/cctest/test-assembler-arm64.cc +++ b/test/cctest/test-assembler-arm64.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include #include #include diff --git a/test/cctest/test-assembler-ia32.cc b/test/cctest/test-assembler-ia32.cc index e62cc210eb..c3855c1adc 100644 --- a/test/cctest/test-assembler-ia32.cc +++ b/test/cctest/test-assembler-ia32.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include #include "src/v8.h" @@ -443,6 +446,7 @@ TEST(AssemblerMultiByteNop) { void DoSSE2(const v8::FunctionCallbackInfo& args) { Isolate* isolate = reinterpret_cast(CcTest::isolate()); HandleScope scope(isolate); + v8::Local context = CcTest::isolate()->GetCurrentContext(); CHECK(args[0]->IsArray()); v8::Local vec = v8::Local::Cast(args[0]); @@ -456,7 +460,8 @@ void DoSSE2(const v8::FunctionCallbackInfo& args) { // Store input vector on the stack. for (unsigned i = 0; i < ELEMENT_COUNT; ++i) { - __ push(Immediate(vec->Get(i)->Int32Value())); + __ push(Immediate( + vec->Get(context, i).ToLocalChecked()->Int32Value(context).FromJust())); } // Read vector into a xmm register. @@ -490,7 +495,7 @@ TEST(StackAlignmentForSSE2) { v8::Isolate* isolate = CcTest::isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle global_template = + v8::Local global_template = v8::ObjectTemplate::New(isolate); global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(isolate, DoSSE2)); @@ -502,20 +507,21 @@ TEST(StackAlignmentForSSE2) { "}"); v8::Local global_object = env->Global(); - v8::Local foo = - v8::Local::Cast(global_object->Get(v8_str("foo"))); + v8::Local foo = v8::Local::Cast( + global_object->Get(env.local(), v8_str("foo")).ToLocalChecked()); int32_t vec[ELEMENT_COUNT] = { -1, 1, 1, 1 }; v8::Local v8_vec = v8::Array::New(isolate, ELEMENT_COUNT); for (unsigned i = 0; i < ELEMENT_COUNT; i++) { - v8_vec->Set(i, v8_num(vec[i])); + v8_vec->Set(env.local(), i, v8_num(vec[i])).FromJust(); } v8::Local args[] = { v8_vec }; - v8::Local result = foo->Call(global_object, 1, args); + v8::Local result = + foo->Call(env.local(), global_object, 1, args).ToLocalChecked(); // The mask should be 0b1000. - CHECK_EQ(8, result->Int32Value()); + CHECK_EQ(8, result->Int32Value(env.local()).FromJust()); } #undef ELEMENT_COUNT diff --git a/test/cctest/test-assembler-mips.cc b/test/cctest/test-assembler-mips.cc index 472032bf5a..49e5c1698a 100644 --- a/test/cctest/test-assembler-mips.cc +++ b/test/cctest/test-assembler-mips.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include // NOLINT(readability/streams) #include "src/v8.h" diff --git a/test/cctest/test-assembler-mips64.cc b/test/cctest/test-assembler-mips64.cc index 7de56f9360..abc90cddd4 100644 --- a/test/cctest/test-assembler-mips64.cc +++ b/test/cctest/test-assembler-mips64.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include // NOLINT(readability/streams) #include "src/v8.h" diff --git a/test/cctest/test-assembler-ppc.cc b/test/cctest/test-assembler-ppc.cc index b2dca6a9fc..3d5371c2a7 100644 --- a/test/cctest/test-assembler-ppc.cc +++ b/test/cctest/test-assembler-ppc.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include "src/v8.h" #include "src/disassembler.h" diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc index cc87c4ebf6..1f56f8b5ce 100644 --- a/test/cctest/test-assembler-x64.cc +++ b/test/cctest/test-assembler-x64.cc @@ -25,6 +25,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// TODO(jochen): Remove this after the setting is turned on globally. +#define V8_IMMINENT_DEPRECATION_WARNINGS + #include #include @@ -591,6 +594,7 @@ TEST(AssemblerMultiByteNop) { void DoSSE2(const v8::FunctionCallbackInfo& args) { v8::HandleScope scope(CcTest::isolate()); + v8::Local context = CcTest::isolate()->GetCurrentContext(); byte buffer[1024]; CHECK(args[0]->IsArray()); @@ -605,9 +609,15 @@ void DoSSE2(const v8::FunctionCallbackInfo& args) { // Store input vector on the stack. for (unsigned i = 0; i < ELEMENT_COUNT; i++) { - __ movl(rax, Immediate(vec->Get(i)->Int32Value())); + __ movl(rax, Immediate(vec->Get(context, i) + .ToLocalChecked() + ->Int32Value(context) + .FromJust())); __ shlq(rax, Immediate(0x20)); - __ orq(rax, Immediate(vec->Get(++i)->Int32Value())); + __ orq(rax, Immediate(vec->Get(context, ++i) + .ToLocalChecked() + ->Int32Value(context) + .FromJust())); __ pushq(rax); } @@ -641,7 +651,7 @@ TEST(StackAlignmentForSSE2) { v8::Isolate* isolate = CcTest::isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle global_template = + v8::Local global_template = v8::ObjectTemplate::New(isolate); global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(isolate, DoSSE2)); @@ -653,20 +663,21 @@ TEST(StackAlignmentForSSE2) { "}"); v8::Local global_object = env->Global(); - v8::Local foo = - v8::Local::Cast(global_object->Get(v8_str("foo"))); + v8::Local foo = v8::Local::Cast( + global_object->Get(env.local(), v8_str("foo")).ToLocalChecked()); int32_t vec[ELEMENT_COUNT] = { -1, 1, 1, 1 }; v8::Local v8_vec = v8::Array::New(isolate, ELEMENT_COUNT); for (unsigned i = 0; i < ELEMENT_COUNT; i++) { - v8_vec->Set(i, v8_num(vec[i])); + v8_vec->Set(env.local(), i, v8_num(vec[i])).FromJust(); } v8::Local args[] = { v8_vec }; - v8::Local result = foo->Call(global_object, 1, args); + v8::Local result = + foo->Call(env.local(), global_object, 1, args).ToLocalChecked(); // The mask should be 0b1000. - CHECK_EQ(8, result->Int32Value()); + CHECK_EQ(8, result->Int32Value(env.local()).FromJust()); } #undef ELEMENT_COUNT