Index: test/cctest/test-js-arm64-variables.cc |
diff --git a/test/cctest/test-js-arm64-variables.cc b/test/cctest/test-js-arm64-variables.cc |
index 98d3365b87f88cda99282e69a2812a3417073b9b..24e4cf811c00260ad1a2ccae360a78bad8515ce5 100644 |
--- a/test/cctest/test-js-arm64-variables.cc |
+++ b/test/cctest/test-js-arm64-variables.cc |
@@ -27,6 +27,9 @@ |
// Adapted from test/mjsunit/compiler/variables.js |
+// TODO(jochen): Remove this after the setting is turned on globally. |
+#define V8_IMMINENT_DEPRECATION_WARNINGS |
+ |
#include <limits.h> |
#include "src/v8.h" |
@@ -45,7 +48,6 @@ using ::v8::Context; |
using ::v8::Extension; |
using ::v8::Function; |
using ::v8::FunctionTemplate; |
-using ::v8::Handle; |
using ::v8::HandleScope; |
using ::v8::Local; |
using ::v8::Message; |
@@ -61,9 +63,10 @@ using ::v8::Undefined; |
using ::v8::V8; |
using ::v8::Value; |
-static void ExpectInt32(int32_t expected, Local<Value> result) { |
+static void ExpectInt32(Local<Context> context, int32_t expected, |
+ Local<Value> result) { |
CHECK(result->IsInt32()); |
- CHECK_EQ(expected, result->Int32Value()); |
+ CHECK_EQ(expected, result->Int32Value(context).FromJust()); |
} |
@@ -75,7 +78,7 @@ TEST(global_variables) { |
"var x = 0;" |
"function f0() { return x; }" |
"f0();"); |
- ExpectInt32(0, result); |
+ ExpectInt32(env.local(), 0, result); |
} |
@@ -86,7 +89,7 @@ TEST(parameters) { |
Local<Value> result = CompileRun( |
"function f1(x) { return x; }" |
"f1(1);"); |
- ExpectInt32(1, result); |
+ ExpectInt32(env.local(), 1, result); |
} |
@@ -97,7 +100,7 @@ TEST(stack_allocated_locals) { |
Local<Value> result = CompileRun( |
"function f2() { var x = 2; return x; }" |
"f2();"); |
- ExpectInt32(2, result); |
+ ExpectInt32(env.local(), 2, result); |
} |
@@ -111,7 +114,7 @@ TEST(context_allocated_locals) { |
" return x;" |
"}" |
"f3(3);"); |
- ExpectInt32(3, result); |
+ ExpectInt32(env.local(), 3, result); |
} |
@@ -125,7 +128,7 @@ TEST(read_from_outer_context) { |
" return g();" |
"}" |
"f4(4);"); |
- ExpectInt32(4, result); |
+ ExpectInt32(env.local(), 4, result); |
} |
@@ -138,5 +141,5 @@ TEST(lookup_slots) { |
" with ({}) return x;" |
"}" |
"f5(5);"); |
- ExpectInt32(5, result); |
+ ExpectInt32(env.local(), 5, result); |
} |