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" |
11 #include "vm/exceptions.h" | 11 #include "vm/exceptions.h" |
12 #include "vm/longjump.h" | 12 #include "vm/longjump.h" |
| 13 #include "vm/message_queue.h" |
13 #include "vm/object.h" | 14 #include "vm/object.h" |
14 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
15 #include "vm/port.h" | 16 #include "vm/port.h" |
16 #include "vm/resolver.h" | 17 #include "vm/resolver.h" |
17 #include "vm/snapshot.h" | 18 #include "vm/snapshot.h" |
18 #include "vm/thread.h" | 19 #include "vm/thread.h" |
19 | 20 |
20 namespace dart { | 21 namespace dart { |
21 | 22 |
22 class IsolateStartData { | 23 class IsolateStartData { |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 } | 356 } |
356 | 357 |
357 | 358 |
358 DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 3) { | 359 DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 3) { |
359 intptr_t send_id = Smi::CheckedHandle(arguments->At(0)).Value(); | 360 intptr_t send_id = Smi::CheckedHandle(arguments->At(0)).Value(); |
360 intptr_t reply_id = Smi::CheckedHandle(arguments->At(1)).Value(); | 361 intptr_t reply_id = Smi::CheckedHandle(arguments->At(1)).Value(); |
361 // TODO(iposva): Allow for arbitrary messages to be sent. | 362 // TODO(iposva): Allow for arbitrary messages to be sent. |
362 uint8_t* data = SerializeObject(Instance::CheckedHandle(arguments->At(2))); | 363 uint8_t* data = SerializeObject(Instance::CheckedHandle(arguments->At(2))); |
363 | 364 |
364 // TODO(turnidge): Throw an exception when the return value is false? | 365 // TODO(turnidge): Throw an exception when the return value is false? |
365 PortMap::PostMessage(send_id, reply_id, Api::CastMessage(data)); | 366 PortMap::PostMessage(new Message( |
| 367 send_id, reply_id, data, Message::kNormalPriority)); |
366 } | 368 } |
367 | 369 |
368 } // namespace dart | 370 } // namespace dart |
OLD | NEW |