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

Unified Diff: src/heap/heap.cc

Issue 1192743005: Reland 'Additional HandleScopes to limit Handle consumption.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 6 months 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 | « src/handles-inl.h ('k') | src/runtime/runtime-literals.cc » ('j') | 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 27c24f34b15fd5a9bedd121cad06463456da8f6b..6039bdb4c6ba64d3d47b7bd9f527c1e9e460bae2 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -646,8 +646,8 @@ void Heap::GarbageCollectionEpilogue() {
if (FLAG_print_handles) PrintHandles();
if (FLAG_gc_verbose) Print();
if (FLAG_code_stats) ReportCodeStatistics("After GC");
-#endif
if (FLAG_check_handle_count) CheckHandleCount();
+#endif
if (FLAG_deopt_every_n_garbage_collections > 0) {
// TODO(jkummerow/ulan/jarin): This is not safe! We can't assume that
// the topmost optimized frame can be deoptimized safely, because it
@@ -5991,7 +5991,9 @@ void Heap::PrintHandles() {
class CheckHandleCountVisitor : public ObjectVisitor {
public:
CheckHandleCountVisitor() : handle_count_(0) {}
- ~CheckHandleCountVisitor() { CHECK_LT(handle_count_, 2000); }
+ ~CheckHandleCountVisitor() {
+ CHECK(handle_count_ < HandleScope::kCheckHandleThreshold);
+ }
void VisitPointers(Object** start, Object** end) {
handle_count_ += end - start;
}
« no previous file with comments | « src/handles-inl.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698