Index: runtime/lib/isolate.cc |
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc |
index 82a0fc183b7c452bf0c8531bc913c5cd77a96323..215e66dc713128fde3c58ee4ee358ec94d6e7c1f 100644 |
--- a/runtime/lib/isolate.cc |
+++ b/runtime/lib/isolate.cc |
@@ -250,6 +250,17 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 5) { |
} |
+DEFINE_NATIVE_ENTRY(Isolate_getCurrent, 0) { |
+ const Array& result = Array::Handle(Array::New(3)); |
+ result.SetAt(0, SendPort::Handle(SendPort::New(isolate->main_port()))); |
+ result.SetAt(1, Capability::Handle( |
+ Capability::New(isolate->pause_capability()))); |
+ result.SetAt(2, Capability::Handle( |
+ Capability::New(isolate->terminate_capability()))); |
Lasse Reichstein Nielsen
2014/12/02 10:47:39
This doesn't seem to be working.
Ivan: Does the VM
|
+ return result.raw(); |
+} |
+ |
+ |
DEFINE_NATIVE_ENTRY(Isolate_sendOOB, 2) { |
GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0)); |
GET_NON_NULL_NATIVE_ARGUMENT(Array, msg, arguments->NativeArgAt(1)); |