@@ -509,7 +509,11 @@ static void PrintJavaScriptErrorStack(std::ostream& out, Isolate* isolate, Maybe
509
509
}
510
510
// Print the stack trace, samples are not available as the exception isn't from the current stack.
511
511
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 );
513
517
}
514
518
}
515
519
@@ -545,9 +549,17 @@ static void PrintStackFromStackTrace(std::ostream& out, Isolate* isolate, DumpEv
545
549
// Print the stack trace, adding in the pc values from GetStackSample() if available
546
550
for (int i = 0 ; i < stack->GetFrameCount (); i++) {
547
551
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]);
549
557
} 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 );
551
563
}
552
564
}
553
565
}
0 commit comments