From 734addf8c2fe59227ba8e8abcc78504b07390ab4 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 15 Mar 2019 01:32:25 +0000 Subject: [PATCH] Fix use of deprecated methods removed in V8 7.0 StackFrame::GetFrame(uint32_t index) was deprecated in V8 6.9 and removed in V8 7.0. Missed a Windows only instance in 26f88d0. Refs: https://github.com/nodejs/node-report/pull/119 PR-URL: https://github.com/nodejs/node-report/pull/124 Refs: https://github.com/nodejs/node-report/pull/119 Reviewed-By: Michael Dawson Reviewed-By: Sam Roberts --- src/module.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/module.cc b/src/module.cc index ca1d86e..9480a11 100644 --- a/src/module.cc +++ b/src/module.cc @@ -212,7 +212,11 @@ static void PrintStackFromStackTrace(Isolate* isolate, FILE* fp) { StackTrace::kDetailed); // Print the JavaScript function name and source information for each frame for (int i = 0; i < stack->GetFrameCount(); i++) { - Local frame = stack->GetFrame(i); + Local frame = stack->GetFrame( +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7) + isolate, +#endif + i); Nan::Utf8String fn_name_s(frame->GetFunctionName()); Nan::Utf8String script_name(frame->GetScriptName()); const int line_number = frame->GetLineNumber();