Index: test/cctest/test-platform.cc |
diff --git a/test/cctest/test-platform.cc b/test/cctest/test-platform.cc |
index 2576af81a556a0dbd6dab1167709146555240f08..771be1fd091c7956aedfd146f3f93ad09da298be 100644 |
--- a/test/cctest/test-platform.cc |
+++ b/test/cctest/test-platform.cc |
@@ -2,6 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+// TODO(mythria): Remove this define after this flag is turned on globally |
+#define V8_IMMINENT_DEPRECATION_WARNINGS |
+ |
#include <stdint.h> |
#include "src/base/build_config.h" |
#include "src/base/platform/platform.h" |
@@ -40,7 +43,7 @@ void GetStackPointer(const v8::FunctionCallbackInfo<v8::Value>& args) { |
TEST(StackAlignment) { |
v8::Isolate* isolate = CcTest::isolate(); |
v8::HandleScope handle_scope(isolate); |
- v8::Handle<v8::ObjectTemplate> global_template = |
+ v8::Local<v8::ObjectTemplate> global_template = |
v8::ObjectTemplate::New(isolate); |
global_template->Set(v8_str("get_stack_pointer"), |
v8::FunctionTemplate::New(isolate, GetStackPointer)); |
@@ -52,12 +55,15 @@ TEST(StackAlignment) { |
"}"); |
v8::Local<v8::Object> global_object = env->Global(); |
- v8::Local<v8::Function> foo = |
- v8::Local<v8::Function>::Cast(global_object->Get(v8_str("foo"))); |
+ v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast( |
+ global_object->Get(isolate->GetCurrentContext(), v8_str("foo")) |
+ .ToLocalChecked()); |
- v8::Local<v8::Value> result = foo->Call(global_object, 0, NULL); |
- CHECK_EQ(0u, |
- result->Uint32Value() % v8::base::OS::ActivationFrameAlignment()); |
+ v8::Local<v8::Value> result = |
+ foo->Call(isolate->GetCurrentContext(), global_object, 0, NULL) |
+ .ToLocalChecked(); |
+ CHECK_EQ(0u, result->Uint32Value(isolate->GetCurrentContext()).FromJust() % |
+ v8::base::OS::ActivationFrameAlignment()); |
} |
#endif // V8_CC_GNU |