| Index: runtime/vm/dart_api_state.h
|
| ===================================================================
|
| --- runtime/vm/dart_api_state.h (revision 23307)
|
| +++ runtime/vm/dart_api_state.h (working copy)
|
| @@ -187,7 +187,7 @@
|
| if (callback != NULL) {
|
| void* peer = handle->peer();
|
| handle->Clear();
|
| - (*callback)(reinterpret_cast<Dart_Handle>(handle), peer);
|
| + (*callback)(reinterpret_cast<Dart_WeakPersistentHandle>(handle), peer);
|
| } else {
|
| handle->Clear();
|
| }
|
| @@ -351,7 +351,7 @@
|
| }
|
|
|
| // Validate if passed in handle is a Persistent Handle.
|
| - bool IsValidHandle(Dart_Handle object) const {
|
| + bool IsValidHandle(Dart_PersistentHandle object) const {
|
| return IsValidScopedHandle(reinterpret_cast<uword>(object));
|
| }
|
|
|
| @@ -425,7 +425,7 @@
|
| }
|
|
|
| // Validate if passed in handle is a Persistent Handle.
|
| - bool IsValidHandle(Dart_Handle object) const {
|
| + bool IsValidHandle(Dart_WeakPersistentHandle object) const {
|
| return IsValidScopedHandle(reinterpret_cast<uword>(object));
|
| }
|
|
|
| @@ -456,14 +456,16 @@
|
| RawObject** get_key(intptr_t i) {
|
| ASSERT(i >= 0);
|
| ASSERT(i < num_keys_);
|
| - return (reinterpret_cast<PersistentHandle*>(keys_[i]))->raw_addr();
|
| + return (reinterpret_cast<FinalizablePersistentHandle*>(keys_[i]))->
|
| + raw_addr();
|
| }
|
|
|
| intptr_t num_values() const { return num_values_; }
|
| RawObject** get_value(intptr_t i) {
|
| ASSERT(i >= 0);
|
| ASSERT(i < num_values_);
|
| - return (reinterpret_cast<PersistentHandle*>(values_[i]))->raw_addr();
|
| + return (reinterpret_cast<FinalizablePersistentHandle*>(values_[i]))->
|
| + raw_addr();
|
| }
|
|
|
| static WeakReferenceSet* Pop(WeakReferenceSet** queue) {
|
| @@ -617,15 +619,16 @@
|
| return false;
|
| }
|
|
|
| - bool IsValidPersistentHandle(Dart_Handle object) const {
|
| + bool IsValidPersistentHandle(Dart_PersistentHandle object) const {
|
| return persistent_handles_.IsValidHandle(object);
|
| }
|
|
|
| - bool IsValidWeakPersistentHandle(Dart_Handle object) const {
|
| + bool IsValidWeakPersistentHandle(Dart_WeakPersistentHandle object) const {
|
| return weak_persistent_handles_.IsValidHandle(object);
|
| }
|
|
|
| - bool IsValidPrologueWeakPersistentHandle(Dart_Handle object) const {
|
| + bool IsValidPrologueWeakPersistentHandle(
|
| + Dart_WeakPersistentHandle object) const {
|
| return prologue_weak_persistent_handles_.IsValidHandle(object);
|
| }
|
|
|
| @@ -655,27 +658,6 @@
|
| }
|
| return total;
|
| }
|
| - PersistentHandle* Null() {
|
| - if (null_ == NULL) {
|
| - null_ = persistent_handles().AllocateHandle();
|
| - null_->set_raw(Object::null());
|
| - }
|
| - return null_;
|
| - }
|
| - PersistentHandle* True() {
|
| - if (true_ == NULL) {
|
| - true_ = persistent_handles().AllocateHandle();
|
| - true_->set_raw(Bool::True());
|
| - }
|
| - return true_;
|
| - }
|
| - PersistentHandle* False() {
|
| - if (false_ == NULL) {
|
| - false_ = persistent_handles().AllocateHandle();
|
| - false_->set_raw(Bool::False());
|
| - }
|
| - return false_;
|
| - }
|
|
|
| void SetupAcquiredError() {
|
| ASSERT(acquired_error_ == NULL);
|
|
|