Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: test/cctest/test-platform.cc

Issue 1371363006: Continuing removing deprecated function from cctest (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a bug in test-serialize.cc. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-platform-linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698