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

Unified Diff: runtime/vm/dart_api_state.h

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 | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/gc_marker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_state.h
diff --git a/runtime/vm/dart_api_state.h b/runtime/vm/dart_api_state.h
index fc80adc4fc3752389b16996199169dc1ab7fd263..a1f276ca8c79bf734b0dba9a215355096f785c2c 100644
--- a/runtime/vm/dart_api_state.h
+++ b/runtime/vm/dart_api_state.h
@@ -135,8 +135,8 @@ class WeakPersistentHandle {
}
static void Finalize(WeakPersistentHandle* handle) {
- if (handle->callback() != NULL) {
- Dart_WeakPersistentHandleFinalizer callback = handle->callback();
+ Dart_WeakPersistentHandleFinalizer callback = handle->callback();
+ if (callback != NULL) {
void* peer = handle->peer();
handle->Clear();
(*callback)(reinterpret_cast<Dart_Handle>(handle), peer);
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/gc_marker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698