@@ -509,7 +509,11 @@ static void PrintJavaScriptErrorStack(std::ostream& out, Isolate* isolate, Maybe
509509 }
510510 // Print the stack trace, samples are not available as the exception isn't from the current stack.
511511 for (int i = 0 ; i < stack->GetFrameCount (); i++) {
512- PrintStackFrame (out, isolate, stack->GetFrame (i), i, nullptr );
512+ PrintStackFrame (out, isolate, stack->GetFrame (
513+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
514+ isolate,
515+ #endif
516+ i), i, nullptr );
513517 }
514518}
515519
@@ -545,9 +549,17 @@ static void PrintStackFromStackTrace(std::ostream& out, Isolate* isolate, DumpEv
545549 // Print the stack trace, adding in the pc values from GetStackSample() if available
546550 for (int i = 0 ; i < stack->GetFrameCount (); i++) {
547551 if (static_cast <size_t >(i) < info.frames_count ) {
548- PrintStackFrame (out, isolate, stack->GetFrame (i), i, samples[i]);
552+ PrintStackFrame (out, isolate, stack->GetFrame (
553+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
554+ isolate,
555+ #endif
556+ i), i, samples[i]);
549557 } else {
550- PrintStackFrame (out, isolate, stack->GetFrame (i), i, nullptr );
558+ PrintStackFrame (out, isolate, stack->GetFrame (
559+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 7)
560+ isolate,
561+ #endif
562+ i), i, nullptr );
551563 }
552564 }
553565}
0 commit comments