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

Unified Diff: runtime/vm/object.cc

Issue 15772005: - Add different types for persistent and weak persistent handles (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/object.h ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 23307)
+++ runtime/vm/object.cc (working copy)
@@ -296,7 +296,7 @@
}
-static void DeleteWeakPersistentHandle(Dart_Handle handle) {
+static void DeleteWeakPersistentHandle(Dart_WeakPersistentHandle handle) {
ApiState* state = Isolate::Current()->api_state();
ASSERT(state != NULL);
FinalizablePersistentHandle* weak_ref =
@@ -5108,7 +5108,7 @@
}
-void TokenStream::DataFinalizer(Dart_Handle handle, void *peer) {
+void TokenStream::DataFinalizer(Dart_WeakPersistentHandle handle, void *peer) {
ASSERT(peer != NULL);
::free(peer);
DeleteWeakPersistentHandle(handle);
@@ -12332,7 +12332,8 @@
}
-void ExternalOneByteString::Finalize(Dart_Handle handle, void* peer) {
+void ExternalOneByteString::Finalize(Dart_WeakPersistentHandle handle,
+ void* peer) {
delete reinterpret_cast<ExternalStringData<uint8_t>*>(peer);
DeleteWeakPersistentHandle(handle);
}
@@ -12369,7 +12370,8 @@
}
-void ExternalTwoByteString::Finalize(Dart_Handle handle, void* peer) {
+void ExternalTwoByteString::Finalize(Dart_WeakPersistentHandle handle,
+ void* peer) {
delete reinterpret_cast<ExternalStringData<uint16_t>*>(peer);
DeleteWeakPersistentHandle(handle);
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698