OLD | NEW |
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 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 // --- Messages and Ports --- | 1570 // --- Messages and Ports --- |
1571 | 1571 |
1572 DART_EXPORT void Dart_SetMessageNotifyCallback( | 1572 DART_EXPORT void Dart_SetMessageNotifyCallback( |
1573 Dart_MessageNotifyCallback message_notify_callback) { | 1573 Dart_MessageNotifyCallback message_notify_callback) { |
1574 Isolate* isolate = Isolate::Current(); | 1574 Isolate* isolate = Isolate::Current(); |
1575 CHECK_ISOLATE(isolate); | 1575 CHECK_ISOLATE(isolate); |
1576 isolate->set_message_notify_callback(message_notify_callback); | 1576 isolate->set_message_notify_callback(message_notify_callback); |
1577 } | 1577 } |
1578 | 1578 |
1579 | 1579 |
| 1580 DART_EXPORT Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { |
| 1581 Isolate* isolate = Isolate::Current(); |
| 1582 CHECK_ISOLATE(isolate); |
| 1583 return isolate->message_notify_callback(); |
| 1584 } |
| 1585 |
| 1586 |
1580 struct RunLoopData { | 1587 struct RunLoopData { |
1581 Monitor* monitor; | 1588 Monitor* monitor; |
1582 bool done; | 1589 bool done; |
1583 }; | 1590 }; |
1584 | 1591 |
1585 | 1592 |
1586 static void RunLoopDone(uword param) { | 1593 static void RunLoopDone(uword param) { |
1587 RunLoopData* data = reinterpret_cast<RunLoopData*>(param); | 1594 RunLoopData* data = reinterpret_cast<RunLoopData*>(param); |
1588 ASSERT(data->monitor != NULL); | 1595 ASSERT(data->monitor != NULL); |
1589 MonitorLocker ml(data->monitor); | 1596 MonitorLocker ml(data->monitor); |
(...skipping 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6104 return Api::Success(); | 6111 return Api::Success(); |
6105 } | 6112 } |
6106 #endif // DART_PRECOMPILER | 6113 #endif // DART_PRECOMPILER |
6107 | 6114 |
6108 | 6115 |
6109 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6116 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
6110 return Dart::IsRunningPrecompiledCode(); | 6117 return Dart::IsRunningPrecompiledCode(); |
6111 } | 6118 } |
6112 | 6119 |
6113 } // namespace dart | 6120 } // namespace dart |
OLD | NEW |