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

Unified Diff: runtime/vm/object.cc

Issue 9655011: Implement prologue weak persistent handles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: minor pre-review changes Created 8 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 269f23e231518fcdc1687d83b3229937e0aea862..bf7aa862d7718a2a58ce9d755f728f23a981cdaa 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -7837,7 +7837,7 @@ static void AddFinalizer(const Object& referent,
ASSERT(callback != NULL);
ApiState* state = Isolate::Current()->api_state();
ASSERT(state != NULL);
- WeakPersistentHandle* weak_ref =
+ FinalizablePersistentHandle* weak_ref =
state->weak_persistent_handles().AllocateHandle();
weak_ref->set_raw(referent);
weak_ref->set_peer(peer);
@@ -7876,8 +7876,8 @@ RawExternalOneByteString* ExternalOneByteString::New(
static void DeleteWeakPersistentHandle(Dart_Handle handle) {
ApiState* state = Isolate::Current()->api_state();
ASSERT(state != NULL);
- WeakPersistentHandle* weak_ref =
- reinterpret_cast<WeakPersistentHandle*>(handle);
+ FinalizablePersistentHandle* weak_ref =
+ reinterpret_cast<FinalizablePersistentHandle*>(handle);
ASSERT(state->IsValidWeakPersistentHandle(handle));
state->weak_persistent_handles().FreeHandle(weak_ref);
}

Powered by Google App Engine
This is Rietveld 408576698