Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index ae7b4676aed293638cec1259a51c29a5f11113d5..f29205b4043150a50c5b24fc1ebc9d21331cf0a9 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -2206,6 +2206,11 @@ void MarkCompactCollector::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) { |
embedder_heap_tracer_ = tracer; |
} |
+bool MarkCompactCollector::RequiresImmediateWrapperProcessing() { |
+ const size_t kTooManyWrappers = 16000; |
+ return wrappers_to_trace_.size() > kTooManyWrappers; |
+} |
+ |
void MarkCompactCollector::RegisterWrappersWithEmbedderHeapTracer() { |
DCHECK(UsingEmbedderHeapTracer()); |
if (wrappers_to_trace_.empty()) { |