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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 13452007: Add new Dart API call Dart_MakeIsolateRunnable(). This would allow an (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 bool Dart_IsolateMakeRunnable(Dart_Isolate isolate) {
942 CHECK_NO_ISOLATE(Isolate::Current());
943 if (isolate == NULL) {
944 FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC);
945 }
946 Isolate* iso = reinterpret_cast<Isolate*>(isolate);
947 return iso->MakeRunnable();
948 }
949
950
941 // --- Messages and Ports --- 951 // --- Messages and Ports ---
942 952
943 DART_EXPORT void Dart_SetMessageNotifyCallback( 953 DART_EXPORT void Dart_SetMessageNotifyCallback(
944 Dart_MessageNotifyCallback message_notify_callback) { 954 Dart_MessageNotifyCallback message_notify_callback) {
945 Isolate* isolate = Isolate::Current(); 955 Isolate* isolate = Isolate::Current();
946 CHECK_ISOLATE(isolate); 956 CHECK_ISOLATE(isolate);
947 isolate->set_message_notify_callback(message_notify_callback); 957 isolate->set_message_notify_callback(message_notify_callback);
948 } 958 }
949 959
950 960
(...skipping 3859 matching lines...) Expand 10 before | Expand all | Expand 10 after
4810 } 4820 }
4811 { 4821 {
4812 NoGCScope no_gc; 4822 NoGCScope no_gc;
4813 RawObject* raw_obj = obj.raw(); 4823 RawObject* raw_obj = obj.raw();
4814 isolate->heap()->SetPeer(raw_obj, peer); 4824 isolate->heap()->SetPeer(raw_obj, peer);
4815 } 4825 }
4816 return Api::Success(isolate); 4826 return Api::Success(isolate);
4817 } 4827 }
4818 4828
4819 } // namespace dart 4829 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698