| 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 "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 return reinterpret_cast<Dart_Isolate>(isolate); | 791 return reinterpret_cast<Dart_Isolate>(isolate); |
| 792 } | 792 } |
| 793 *error = strdup(error_obj.ToErrorCString()); | 793 *error = strdup(error_obj.ToErrorCString()); |
| 794 } | 794 } |
| 795 Dart::ShutdownIsolate(); | 795 Dart::ShutdownIsolate(); |
| 796 return reinterpret_cast<Dart_Isolate>(NULL); | 796 return reinterpret_cast<Dart_Isolate>(NULL); |
| 797 } | 797 } |
| 798 | 798 |
| 799 | 799 |
| 800 DART_EXPORT void Dart_ShutdownIsolate() { | 800 DART_EXPORT void Dart_ShutdownIsolate() { |
| 801 CHECK_ISOLATE(Isolate::Current()); | 801 Isolate* isolate = Isolate::Current(); |
| 802 CHECK_ISOLATE(isolate); |
| 803 { |
| 804 StackZone zone(isolate); |
| 805 HandleScope handle_scope(isolate); |
| 806 Dart::RunShutdownCallback(); |
| 807 } |
| 802 STOP_TIMER(time_total_runtime); | 808 STOP_TIMER(time_total_runtime); |
| 803 Dart::ShutdownIsolate(); | 809 Dart::ShutdownIsolate(); |
| 804 } | 810 } |
| 805 | 811 |
| 806 | 812 |
| 807 DART_EXPORT Dart_Isolate Dart_CurrentIsolate() { | 813 DART_EXPORT Dart_Isolate Dart_CurrentIsolate() { |
| 808 return Api::CastIsolate(Isolate::Current()); | 814 return Api::CastIsolate(Isolate::Current()); |
| 809 } | 815 } |
| 810 | 816 |
| 811 | 817 |
| (...skipping 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3987 } | 3993 } |
| 3988 { | 3994 { |
| 3989 NoGCScope no_gc; | 3995 NoGCScope no_gc; |
| 3990 RawObject* raw_obj = obj.raw(); | 3996 RawObject* raw_obj = obj.raw(); |
| 3991 isolate->heap()->SetPeer(raw_obj, peer); | 3997 isolate->heap()->SetPeer(raw_obj, peer); |
| 3992 } | 3998 } |
| 3993 return Api::Success(); | 3999 return Api::Success(); |
| 3994 } | 4000 } |
| 3995 | 4001 |
| 3996 } // namespace dart | 4002 } // namespace dart |
| OLD | NEW |