| 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 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 | 931 |
| 932 DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate) { | 932 DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate) { |
| 933 if (isolate == NULL) { | 933 if (isolate == NULL) { |
| 934 FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); | 934 FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); |
| 935 } | 935 } |
| 936 Isolate* iso = reinterpret_cast<Isolate*>(isolate); | 936 Isolate* iso = reinterpret_cast<Isolate*>(isolate); |
| 937 iso->ScheduleInterrupts(Isolate::kApiInterrupt); | 937 iso->ScheduleInterrupts(Isolate::kApiInterrupt); |
| 938 } | 938 } |
| 939 | 939 |
| 940 | 940 |
| 941 DART_EXPORT Dart_Handle Dart_MakeIsolateRunnable() { |
| 942 Isolate* isolate = Isolate::Current(); |
| 943 CHECK_ISOLATE(isolate); |
| 944 bool retval = isolate->MakeRunnable(); |
| 945 if (retval == false) { |
| 946 return Api::NewError("%s expects the isolate to not be already runnable.", |
| 947 CURRENT_FUNC); |
| 948 } |
| 949 return Api::Success(isolate); |
| 950 } |
| 951 |
| 952 |
| 941 // --- Messages and Ports --- | 953 // --- Messages and Ports --- |
| 942 | 954 |
| 943 DART_EXPORT void Dart_SetMessageNotifyCallback( | 955 DART_EXPORT void Dart_SetMessageNotifyCallback( |
| 944 Dart_MessageNotifyCallback message_notify_callback) { | 956 Dart_MessageNotifyCallback message_notify_callback) { |
| 945 Isolate* isolate = Isolate::Current(); | 957 Isolate* isolate = Isolate::Current(); |
| 946 CHECK_ISOLATE(isolate); | 958 CHECK_ISOLATE(isolate); |
| 947 isolate->set_message_notify_callback(message_notify_callback); | 959 isolate->set_message_notify_callback(message_notify_callback); |
| 948 } | 960 } |
| 949 | 961 |
| 950 | 962 |
| (...skipping 3857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4808 } | 4820 } |
| 4809 { | 4821 { |
| 4810 NoGCScope no_gc; | 4822 NoGCScope no_gc; |
| 4811 RawObject* raw_obj = obj.raw(); | 4823 RawObject* raw_obj = obj.raw(); |
| 4812 isolate->heap()->SetPeer(raw_obj, peer); | 4824 isolate->heap()->SetPeer(raw_obj, peer); |
| 4813 } | 4825 } |
| 4814 return Api::Success(isolate); | 4826 return Api::Success(isolate); |
| 4815 } | 4827 } |
| 4816 | 4828 |
| 4817 } // namespace dart | 4829 } // namespace dart |
| OLD | NEW |