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

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: final revision 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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 016201b61a504ae23d180ef09c753386f8ff247a..47857efac4f3ee66ba287930ee7b300b36475bb2 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -7904,7 +7904,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);
@@ -7943,8 +7943,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);
}
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698