Commit 021d8140 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cleanup] Remove uses of deprecated StackTrace::GetFrame

Change-Id: I75877bbdefab35c54b6293835e26222b78c69684
Reviewed-on: https://chromium-review.googlesource.com/1148447
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54674}
parent 7552efaa
This diff is collapsed.
...@@ -659,7 +659,7 @@ TEST(CompileFunctionInContextScriptOrigin) { ...@@ -659,7 +659,7 @@ TEST(CompileFunctionInContextScriptOrigin) {
v8::Exception::GetStackTrace(try_catch.Exception()); v8::Exception::GetStackTrace(try_catch.Exception());
CHECK(!stack.IsEmpty()); CHECK(!stack.IsEmpty());
CHECK_GT(stack->GetFrameCount(), 0); CHECK_GT(stack->GetFrameCount(), 0);
v8::Local<v8::StackFrame> frame = stack->GetFrame(0); v8::Local<v8::StackFrame> frame = stack->GetFrame(CcTest::isolate(), 0);
CHECK_EQ(23, frame->GetLineNumber()); CHECK_EQ(23, frame->GetLineNumber());
CHECK_EQ(42 + strlen("throw "), static_cast<unsigned>(frame->GetColumn())); CHECK_EQ(42 + strlen("throw "), static_cast<unsigned>(frame->GetColumn()));
} }
......
...@@ -35,7 +35,7 @@ namespace { ...@@ -35,7 +35,7 @@ namespace {
void PrintStackTrace(v8::Isolate* isolate, v8::Local<v8::StackTrace> stack) { void PrintStackTrace(v8::Isolate* isolate, v8::Local<v8::StackTrace> stack) {
printf("Stack Trace (length %d):\n", stack->GetFrameCount()); printf("Stack Trace (length %d):\n", stack->GetFrameCount());
for (int i = 0, e = stack->GetFrameCount(); i != e; ++i) { for (int i = 0, e = stack->GetFrameCount(); i != e; ++i) {
v8::Local<v8::StackFrame> frame = stack->GetFrame(i); v8::Local<v8::StackFrame> frame = stack->GetFrame(isolate, i);
v8::Local<v8::String> script = frame->GetScriptName(); v8::Local<v8::String> script = frame->GetScriptName();
v8::Local<v8::String> func = frame->GetFunctionName(); v8::Local<v8::String> func = frame->GetFunctionName();
printf( printf(
...@@ -68,7 +68,7 @@ void CheckExceptionInfos(v8::internal::Isolate* i_isolate, Handle<Object> exc, ...@@ -68,7 +68,7 @@ void CheckExceptionInfos(v8::internal::Isolate* i_isolate, Handle<Object> exc,
CHECK_EQ(N, stack->GetFrameCount()); CHECK_EQ(N, stack->GetFrameCount());
for (int frameNr = 0; frameNr < N; ++frameNr) { for (int frameNr = 0; frameNr < N; ++frameNr) {
v8::Local<v8::StackFrame> frame = stack->GetFrame(frameNr); v8::Local<v8::StackFrame> frame = stack->GetFrame(v8_isolate, frameNr);
v8::String::Utf8Value funName(v8_isolate, frame->GetFunctionName()); v8::String::Utf8Value funName(v8_isolate, frame->GetFunctionName());
CHECK_CSTREQ(excInfos[frameNr].func_name, *funName); CHECK_CSTREQ(excInfos[frameNr].func_name, *funName);
// Line and column are 1-based in v8::StackFrame, just as in ExceptionInfo. // Line and column are 1-based in v8::StackFrame, just as in ExceptionInfo.
......
...@@ -54,7 +54,7 @@ void CheckExceptionInfos(v8::internal::Isolate* i_isolate, Handle<Object> exc, ...@@ -54,7 +54,7 @@ void CheckExceptionInfos(v8::internal::Isolate* i_isolate, Handle<Object> exc,
CHECK_EQ(N, stack->GetFrameCount()); CHECK_EQ(N, stack->GetFrameCount());
for (int frameNr = 0; frameNr < N; ++frameNr) { for (int frameNr = 0; frameNr < N; ++frameNr) {
v8::Local<v8::StackFrame> frame = stack->GetFrame(frameNr); v8::Local<v8::StackFrame> frame = stack->GetFrame(v8_isolate, frameNr);
v8::String::Utf8Value funName(v8_isolate, frame->GetFunctionName()); v8::String::Utf8Value funName(v8_isolate, frame->GetFunctionName());
CHECK_CSTREQ(excInfos[frameNr].func_name, *funName); CHECK_CSTREQ(excInfos[frameNr].func_name, *funName);
CHECK_EQ(excInfos[frameNr].line_nr, frame->GetLineNumber()); CHECK_EQ(excInfos[frameNr].line_nr, frame->GetLineNumber());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment