| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "vm/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
| 6 #include "vm/dart_api_impl.h" | 6 #include "vm/dart_api_impl.h" |
| 7 #include "vm/datastream.h" | 7 #include "vm/datastream.h" |
| 8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/message.h" | 10 #include "vm/message.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 | 128 |
| 129 DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) { | 129 DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) { |
| 130 if (FLAG_trace_service) { | 130 if (FLAG_trace_service) { |
| 131 OS::Print("vm-service: processed exit message.\n"); | 131 OS::Print("vm-service: processed exit message.\n"); |
| 132 } | 132 } |
| 133 return Object::null(); | 133 return Object::null(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 | 136 |
| 137 DEFINE_NATIVE_ENTRY(VMService_OnServerAddressChange, 1) { |
| 138 GET_NATIVE_ARGUMENT(String, address, arguments->NativeArgAt(0)); |
| 139 if (address.IsNull()) { |
| 140 ServiceIsolate::SetServerAddress(NULL); |
| 141 } else { |
| 142 ServiceIsolate::SetServerAddress(address.ToCString()); |
| 143 } |
| 144 return Object::null(); |
| 145 } |
| 146 |
| 147 |
| 137 DEFINE_NATIVE_ENTRY(VMService_ListenStream, 1) { | 148 DEFINE_NATIVE_ENTRY(VMService_ListenStream, 1) { |
| 138 GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0)); | 149 GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0)); |
| 139 bool result = Service::ListenStream(stream_id.ToCString()); | 150 bool result = Service::ListenStream(stream_id.ToCString()); |
| 140 return Bool::Get(result).raw(); | 151 return Bool::Get(result).raw(); |
| 141 } | 152 } |
| 142 | 153 |
| 143 | 154 |
| 144 DEFINE_NATIVE_ENTRY(VMService_CancelStream, 1) { | 155 DEFINE_NATIVE_ENTRY(VMService_CancelStream, 1) { |
| 145 GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0)); | 156 GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0)); |
| 146 Service::CancelStream(stream_id.ToCString()); | 157 Service::CancelStream(stream_id.ToCString()); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 thread->zone(), dart_filename)); | 398 thread->zone(), dart_filename)); |
| 388 result_list.SetAt(idx + 1, Api::UnwrapExternalTypedDataHandle( | 399 result_list.SetAt(idx + 1, Api::UnwrapExternalTypedDataHandle( |
| 389 thread->zone(), dart_contents)); | 400 thread->zone(), dart_contents)); |
| 390 idx += 2; | 401 idx += 2; |
| 391 } | 402 } |
| 392 | 403 |
| 393 return result_list.raw(); | 404 return result_list.raw(); |
| 394 } | 405 } |
| 395 | 406 |
| 396 } // namespace dart | 407 } // namespace dart |
| OLD | NEW |