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

Unified Diff: test/cctest/test-log-stack-tracer.cc

Issue 1449393002: Remove deprecated functions the smaller half of the remaing tests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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-js-arm64-variables.cc ('k') | test/cctest/test-macro-assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-log-stack-tracer.cc
diff --git a/test/cctest/test-log-stack-tracer.cc b/test/cctest/test-log-stack-tracer.cc
index b9147f82e120edb1276ec185afd1a3343b7df84d..8166e41807774dfb8078253f980fe2f45902897e 100644
--- a/test/cctest/test-log-stack-tracer.cc
+++ b/test/cctest/test-log-stack-tracer.cc
@@ -27,6 +27,9 @@
//
// Tests of profiler-related functions from log.h
+// TODO(jochen): Remove this after the setting is turned on globally.
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include <stdlib.h>
#include "src/v8.h"
@@ -65,7 +68,8 @@ static bool IsAddressWithinFuncCode(JSFunction* function, Address addr) {
static bool IsAddressWithinFuncCode(v8::Local<v8::Context> context,
const char* func_name,
Address addr) {
- v8::Local<v8::Value> func = context->Global()->Get(v8_str(func_name));
+ v8::Local<v8::Value> func =
+ context->Global()->Get(context, v8_str(func_name)).ToLocalChecked();
CHECK(func->IsFunction());
JSFunction* js_func = JSFunction::cast(*v8::Utils::OpenHandle(*func));
return IsAddressWithinFuncCode(js_func, addr);
@@ -85,15 +89,18 @@ static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) {
i::StackFrame* calling_frame = frame_iterator.frame();
CHECK(calling_frame->is_java_script());
+ v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
#if defined(V8_HOST_ARCH_32_BIT)
int32_t low_bits = reinterpret_cast<int32_t>(calling_frame->fp());
- args.This()->Set(v8_str("low_bits"), v8_num(low_bits >> 1));
+ args.This()
+ ->Set(context, v8_str("low_bits"), v8_num(low_bits >> 1))
+ .FromJust();
#elif defined(V8_HOST_ARCH_64_BIT)
uint64_t fp = reinterpret_cast<uint64_t>(calling_frame->fp());
int32_t low_bits = static_cast<int32_t>(fp & 0xffffffff);
int32_t high_bits = static_cast<int32_t>(fp >> 32);
- args.This()->Set(v8_str("low_bits"), v8_num(low_bits));
- args.This()->Set(v8_str("high_bits"), v8_num(high_bits));
+ args.This()->Set(context, v8_str("low_bits"), v8_num(low_bits)).FromJust();
+ args.This()->Set(context, v8_str("high_bits"), v8_num(high_bits)).FromJust();
#else
#error Host architecture is neither 32-bit nor 64-bit.
#endif
@@ -107,8 +114,9 @@ void CreateFramePointerGrabberConstructor(v8::Local<v8::Context> context,
Local<v8::FunctionTemplate> constructor_template =
v8::FunctionTemplate::New(context->GetIsolate(), construct_call);
constructor_template->SetClassName(v8_str("FPGrabber"));
- Local<Function> fun = constructor_template->GetFunction();
- context->Global()->Set(v8_str(constructor_name), fun);
+ Local<Function> fun =
+ constructor_template->GetFunction(context).ToLocalChecked();
+ context->Global()->Set(context, v8_str(constructor_name), fun).FromJust();
}
« no previous file with comments | « test/cctest/test-js-arm64-variables.cc ('k') | test/cctest/test-macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698