Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Fix use of deprecated methods removed in V8 7.0 #119

Merged
merged 1 commit into from Jan 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/node_report.cc
Expand Up @@ -509,7 +509,11 @@ static void PrintJavaScriptErrorStack(std::ostream& out, Isolate* isolate, Maybe
}
// Print the stack trace, samples are not available as the exception isn't from the current stack.
for (int i = 0; i < stack->GetFrameCount(); i++) {
PrintStackFrame(out, isolate, stack->GetFrame(i), i, nullptr);
PrintStackFrame(out, isolate, stack->GetFrame(
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
isolate,
#endif
i), i, nullptr);
}
}

Expand Down Expand Up @@ -545,9 +549,17 @@ static void PrintStackFromStackTrace(std::ostream& out, Isolate* isolate, DumpEv
// Print the stack trace, adding in the pc values from GetStackSample() if available
for (int i = 0; i < stack->GetFrameCount(); i++) {
if (static_cast<size_t>(i) < info.frames_count) {
PrintStackFrame(out, isolate, stack->GetFrame(i), i, samples[i]);
PrintStackFrame(out, isolate, stack->GetFrame(
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
isolate,
#endif
i), i, samples[i]);
} else {
PrintStackFrame(out, isolate, stack->GetFrame(i), i, nullptr);
PrintStackFrame(out, isolate, stack->GetFrame(
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
isolate,
#endif
i), i, nullptr);
}
}
}
Expand Down