| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/dart.h" | 8 #include "vm/dart.h" |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 const Array& kNoArgumentNames = Array::Handle(); | 189 const Array& kNoArgumentNames = Array::Handle(); |
| 190 result = DartEntry::InvokeDynamic(target, | 190 result = DartEntry::InvokeDynamic(target, |
| 191 target_function, | 191 target_function, |
| 192 arguments, | 192 arguments, |
| 193 kNoArgumentNames); | 193 kNoArgumentNames); |
| 194 if (result.IsError()) { | 194 if (result.IsError()) { |
| 195 ProcessError(result); | 195 ProcessError(result); |
| 196 } | 196 } |
| 197 ASSERT(result.IsNull()); | 197 ASSERT(result.IsNull()); |
| 198 free(class_name); | 198 free(class_name); |
| 199 free(library_url); |
| 199 result = isolate->StandardRunLoop(); | 200 result = isolate->StandardRunLoop(); |
| 200 if (result.IsError()) { | 201 if (result.IsError()) { |
| 201 ProcessError(result); | 202 ProcessError(result); |
| 202 } | 203 } |
| 203 ASSERT(result.IsNull()); | 204 ASSERT(result.IsNull()); |
| 204 | 205 |
| 205 } else { | 206 } else { |
| 206 Zone zone(isolate); | 207 Zone zone(isolate); |
| 207 HandleScope handle_scope(isolate); | 208 HandleScope handle_scope(isolate); |
| 208 const Error& error = Error::Handle( | 209 const Error& error = Error::Handle( |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 intptr_t send_id = Smi::CheckedHandle(arguments->At(0)).Value(); | 359 intptr_t send_id = Smi::CheckedHandle(arguments->At(0)).Value(); |
| 359 intptr_t reply_id = Smi::CheckedHandle(arguments->At(1)).Value(); | 360 intptr_t reply_id = Smi::CheckedHandle(arguments->At(1)).Value(); |
| 360 // TODO(iposva): Allow for arbitrary messages to be sent. | 361 // TODO(iposva): Allow for arbitrary messages to be sent. |
| 361 uint8_t* data = SerializeObject(Instance::CheckedHandle(arguments->At(2))); | 362 uint8_t* data = SerializeObject(Instance::CheckedHandle(arguments->At(2))); |
| 362 | 363 |
| 363 // TODO(turnidge): Throw an exception when the return value is false? | 364 // TODO(turnidge): Throw an exception when the return value is false? |
| 364 PortMap::PostMessage(send_id, reply_id, Api::CastMessage(data)); | 365 PortMap::PostMessage(send_id, reply_id, Api::CastMessage(data)); |
| 365 } | 366 } |
| 366 | 367 |
| 367 } // namespace dart | 368 } // namespace dart |
| OLD | NEW |