| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 488f35426d06b5255838a9ea537cddec2b323aed..08d44f5bb962d48949acaa6a87577dac6788afab 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -4856,7 +4856,11 @@ void Heap::RecordStats(HeapStats* stats, bool take_snapshot) {
|
| if (stats->js_stacktrace != NULL) {
|
| FixedStringAllocator fixed(stats->js_stacktrace, kStacktraceBufferSize - 1);
|
| StringStream accumulator(&fixed, StringStream::kPrintObjectConcise);
|
| - isolate()->PrintStack(&accumulator, Isolate::kPrintStackVerbose);
|
| + if (gc_state() == Heap::NOT_IN_GC) {
|
| + isolate()->PrintStack(&accumulator, Isolate::kPrintStackVerbose);
|
| + } else {
|
| + accumulator.Add("Cannot get stack trace in GC.");
|
| + }
|
| }
|
| }
|
|
|
|
|