summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-log-stack-tracer.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-07-25 19:30:07 +0200
committerMichaël Zasso <targos@protonmail.com>2018-07-26 08:31:50 +0200
commit6a31d05340b22fc413ee83eaacd0a5565bbbe799 (patch)
tree78f9e1c2f417244842f6422f17e1816e70317100 /deps/v8/test/cctest/test-log-stack-tracer.cc
parent4d94bb2b1f72b6b612983a517a39c5545724a3ad (diff)
downloadnode-new-6a31d05340b22fc413ee83eaacd0a5565bbbe799.tar.gz
deps: update V8 to 6.8.275.24
PR-URL: https://github.com/nodejs/node/pull/21079 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org>
Diffstat (limited to 'deps/v8/test/cctest/test-log-stack-tracer.cc')
-rw-r--r--deps/v8/test/cctest/test-log-stack-tracer.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/deps/v8/test/cctest/test-log-stack-tracer.cc b/deps/v8/test/cctest/test-log-stack-tracer.cc
index 24d6d9c8ba..ad79bfe412 100644
--- a/deps/v8/test/cctest/test-log-stack-tracer.cc
+++ b/deps/v8/test/cctest/test-log-stack-tracer.cc
@@ -45,9 +45,8 @@ namespace v8 {
namespace internal {
static bool IsAddressWithinFuncCode(JSFunction* function, void* addr) {
- Address address = reinterpret_cast<Address>(addr);
i::AbstractCode* code = function->abstract_code();
- return code->contains(address);
+ return code->contains(reinterpret_cast<Address>(addr));
}
static bool IsAddressWithinFuncCode(v8::Local<v8::Context> context,
@@ -80,12 +79,12 @@ static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) {
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());
+ int32_t low_bits = static_cast<int32_t>(calling_frame->fp());
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());
+ Address fp = 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(context, v8_str("low_bits"), v8_num(low_bits)).FromJust();
@@ -167,7 +166,7 @@ TEST(CFromJSStackTrace) {
CHECK(sample.has_external_callback);
CHECK_EQ(FUNCTION_ADDR(i::TraceExtension::Trace),
- sample.external_callback_entry);
+ reinterpret_cast<Address>(sample.external_callback_entry));
// Stack tracing will start from the first JS function, i.e. "JSFuncDoTrace"
unsigned base = 0;
@@ -221,7 +220,7 @@ TEST(PureJSStackTrace) {
CHECK(sample.has_external_callback);
CHECK_EQ(FUNCTION_ADDR(i::TraceExtension::JSTrace),
- sample.external_callback_entry);
+ reinterpret_cast<Address>(sample.external_callback_entry));
// Stack sampling will start from the caller of JSFuncDoTrace, i.e. "JSTrace"
unsigned base = 0;
@@ -231,15 +230,14 @@ TEST(PureJSStackTrace) {
context, "OuterJSTrace", sample.stack[base + 1]));
}
-
-static void CFuncDoTrace(byte dummy_parameter) {
+static void CFuncDoTrace(byte dummy_param) {
Address fp;
#if V8_HAS_BUILTIN_FRAME_ADDRESS
fp = reinterpret_cast<Address>(__builtin_frame_address(0));
#elif V8_CC_MSVC
// Approximate a frame pointer address. We compile without base pointers,
// so we can't trust ebp/rbp.
- fp = &dummy_parameter - 2 * sizeof(void*); // NOLINT
+ fp = reinterpret_cast<Address>(&dummy_param) - 2 * sizeof(void*); // NOLINT
#else
#error Unexpected platform.
#endif