Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: src/heap/heap.cc

Issue 1433663002: Do not print stack-trace for OOM when GC is in progress. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.");
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698