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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 10928065: Revert "Revert "Finalize reachable weak persistent handles at isolate shutdown."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 511ef579d0613f49cb6eae1bccf6b271bb07d77f..ce86fe07d97a2cf2f3f13163b332e26f8134b861 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -1438,6 +1438,19 @@ TEST_CASE(WeakPersistentHandleCallback) {
}
+UNIT_TEST_CASE(WeakPersistentHandlesCallbackShutdown) {
+ TestCase::CreateTestIsolate();
+ Dart_EnterScope();
+ Dart_Handle ref = Dart_True();
+ int peer = 1234;
+ Dart_NewWeakPersistentHandle(ref,
+ &peer,
+ WeakPersistentHandlePeerFinalizer);
+ Dart_ShutdownIsolate();
+ EXPECT(peer == 42);
+}
+
+
TEST_CASE(ObjectGroups) {
Dart_Handle strong = Dart_Null();
EXPECT(Dart_IsNull(strong));
« 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