| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
| 7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 Dart_WeakPersistentHandle object = handle->apiHandle(); | 752 Dart_WeakPersistentHandle object = handle->apiHandle(); |
| 753 (*callback)(isolate->init_callback_data(), object, peer); | 753 (*callback)(isolate->init_callback_data(), object, peer); |
| 754 ApiState* state = isolate->api_state(); | 754 ApiState* state = isolate->api_state(); |
| 755 ASSERT(state != NULL); | 755 ASSERT(state != NULL); |
| 756 state->weak_persistent_handles().FreeHandle(handle); | 756 state->weak_persistent_handles().FreeHandle(handle); |
| 757 } | 757 } |
| 758 | 758 |
| 759 | 759 |
| 760 // --- Handles --- | 760 // --- Handles --- |
| 761 | 761 |
| 762 DART_EXPORT bool Dart_IsValid(Dart_Handle handle) { |
| 763 return Api::IsValid(handle); |
| 764 } |
| 765 |
| 766 |
| 762 DART_EXPORT bool Dart_IsError(Dart_Handle handle) { | 767 DART_EXPORT bool Dart_IsError(Dart_Handle handle) { |
| 763 return Api::IsError(handle); | 768 return Api::IsError(handle); |
| 764 } | 769 } |
| 765 | 770 |
| 766 | 771 |
| 767 DART_EXPORT bool Dart_IsApiError(Dart_Handle object) { | 772 DART_EXPORT bool Dart_IsApiError(Dart_Handle object) { |
| 768 return Api::ClassId(object) == kApiErrorCid; | 773 return Api::ClassId(object) == kApiErrorCid; |
| 769 } | 774 } |
| 770 | 775 |
| 771 | 776 |
| (...skipping 6019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6791 } | 6796 } |
| 6792 | 6797 |
| 6793 | 6798 |
| 6794 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6799 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6795 #ifndef PRODUCT | 6800 #ifndef PRODUCT |
| 6796 Profiler::DumpStackTrace(context); | 6801 Profiler::DumpStackTrace(context); |
| 6797 #endif | 6802 #endif |
| 6798 } | 6803 } |
| 6799 | 6804 |
| 6800 } // namespace dart | 6805 } // namespace dart |
| OLD | NEW |