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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 9398014: Ignore deleted handles when processing weak roots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: final revision Created 8 years, 10 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 | « no previous file | runtime/vm/dart_api_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 14f093d2ae6bb97da35b46fbe415f63546a652fe..db2793f785e72d40657a27deebbc060a62efcc15 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -1337,6 +1337,10 @@ TEST_CASE(WeakPersistentHandle) {
Dart_DeletePersistentHandle(weak_new_ref);
Dart_DeletePersistentHandle(weak_old_ref);
+
+ // garbage collect one last time to revisit deleted handles
+ Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
+ Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
}
« no previous file with comments | « no previous file | runtime/vm/dart_api_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698