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

Unified Diff: runtime/vm/heap.cc

Issue 1776243002: Fix incorrect assertion failures in noopt regarding removing classes that still have constants. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « runtime/vm/heap.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index c5b593e66014874277077296e8d81e8cdba2ac7b..b34af5460018d38e35ee9d4169ff90816a319dd3 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -446,6 +446,19 @@ void Heap::CollectAllGarbage() {
}
+#if defined(DEBUG)
+void Heap::WaitForSweeperTasks() {
+ Thread* thread = Thread::Current();
+ {
+ MonitorLocker ml(old_space_.tasks_lock());
+ while (old_space_.tasks() > 0) {
+ ml.WaitWithSafepointCheck(thread);
+ }
+ }
+}
+#endif
+
+
bool Heap::ShouldPretenure(intptr_t class_id) const {
if (class_id == kOneByteStringCid) {
return pretenure_policy_ > 0;
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698