| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 2  * Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 
| 3  * for details. All rights reserved. Use of this source code is governed by a | 3  * for details. All rights reserved. Use of this source code is governed by a | 
| 4  * BSD-style license that can be found in the LICENSE file. | 4  * BSD-style license that can be found in the LICENSE file. | 
| 5  */ | 5  */ | 
| 6 | 6 | 
| 7 #ifndef INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ | 
| 8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ | 
| 9 | 9 | 
| 10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference | 
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1071  * Most embedders will only call this function once, before isolate | 1071  * Most embedders will only call this function once, before isolate | 
| 1072  * execution begins. If this function is called after isolate | 1072  * execution begins. If this function is called after isolate | 
| 1073  * execution begins, the embedder is responsible for threading issues. | 1073  * execution begins, the embedder is responsible for threading issues. | 
| 1074  */ | 1074  */ | 
| 1075 DART_EXPORT void Dart_SetMessageNotifyCallback( | 1075 DART_EXPORT void Dart_SetMessageNotifyCallback( | 
| 1076     Dart_MessageNotifyCallback message_notify_callback); | 1076     Dart_MessageNotifyCallback message_notify_callback); | 
| 1077 /* TODO(turnidge): Consider moving this to isolate creation so that it | 1077 /* TODO(turnidge): Consider moving this to isolate creation so that it | 
| 1078  * is impossible to mess up. */ | 1078  * is impossible to mess up. */ | 
| 1079 | 1079 | 
| 1080 /** | 1080 /** | 
|  | 1081  * The VM's default message handler supports pausing an isolate before it starts | 
|  | 1082  * and before it exits. This is controlled by two VM flags: | 
|  | 1083  * | 
|  | 1084  *   `--pause-isolates-on-start` | 
|  | 1085  *   `--pause-isolates-on-exit` | 
|  | 1086  * | 
|  | 1087  * When an embedder is using a Dart_MessageNotifyCallback the following | 
|  | 1088  * functions can be used to implement pausing on start and exit. | 
|  | 1089  */ | 
|  | 1090 | 
|  | 1091 /** | 
|  | 1092  * If the VM flag `--pause-isolates-on-start` was passed this will be true. | 
|  | 1093  * | 
|  | 1094  * \return A boolean value indicating if pause on start was requested. | 
|  | 1095  */ | 
|  | 1096 DART_EXPORT bool Dart_ShouldPauseOnStart(); | 
|  | 1097 | 
|  | 1098 /** | 
|  | 1099  * Override the VM flag `--pause-isolates-on-start` for the current isolate. | 
|  | 1100  * | 
|  | 1101  * NOTE: This must be called before Dart_IsolateMakeRunnable. | 
|  | 1102  */ | 
|  | 1103 DART_EXPORT void Dart_SetShouldPauseOnStart(bool value); | 
|  | 1104 | 
|  | 1105 /** | 
|  | 1106  * Is the current isolate paused on start? | 
|  | 1107  * | 
|  | 1108  * \return A boolean value indicating if the isolate is paused on start. | 
|  | 1109  */ | 
|  | 1110 DART_EXPORT bool Dart_IsPausedOnStart(); | 
|  | 1111 | 
|  | 1112 /** | 
|  | 1113  * Called when the embedder has paused the current isolate on start and when | 
|  | 1114  * the embedder has released the isolate. | 
|  | 1115  * | 
|  | 1116  * \return A boolean value indicating if the isolate is paused on start. | 
|  | 1117  */ | 
|  | 1118 DART_EXPORT void Dart_SetPausedOnStart(bool value); | 
|  | 1119 | 
|  | 1120 /** | 
|  | 1121  * If the VM flag `--pause-isolates-on-exit` was passed this will be true. | 
|  | 1122  * | 
|  | 1123  * \return A boolean value indicating if pause on start was requested. | 
|  | 1124  */ | 
|  | 1125 DART_EXPORT bool Dart_ShouldPauseOnExit(); | 
|  | 1126 | 
|  | 1127 /** | 
|  | 1128  * Override the VM flag `--pause-isolates-on-start` for the current isolate. | 
|  | 1129  * | 
|  | 1130  * NOTE: This must be called before Dart_IsolateMakeRunnable. | 
|  | 1131  */ | 
|  | 1132 DART_EXPORT void Dart_SetShouldPauseOnExit(bool value); | 
|  | 1133 | 
|  | 1134 /** | 
|  | 1135  * Is the current isolate paused on exit? | 
|  | 1136  * | 
|  | 1137  * \return A boolean value indicating if the isolate is paused on start. | 
|  | 1138  */ | 
|  | 1139 DART_EXPORT bool Dart_IsPausedOnExit(); | 
|  | 1140 | 
|  | 1141 /** | 
|  | 1142  * Called when the embedder has paused the current isolate on start and when | 
|  | 1143  * the embedder has released the isolate. | 
|  | 1144  * | 
|  | 1145  * \return A boolean value indicating if the isolate is paused on start. | 
|  | 1146  */ | 
|  | 1147 DART_EXPORT void Dart_SetPausedOnExit(bool value); | 
|  | 1148 | 
|  | 1149 | 
|  | 1150 /** | 
| 1081  * Handles the next pending message for the current isolate. | 1151  * Handles the next pending message for the current isolate. | 
| 1082  * | 1152  * | 
| 1083  * May generate an unhandled exception error. | 1153  * May generate an unhandled exception error. | 
| 1084  * | 1154  * | 
| 1085  * \return A valid handle if no error occurs during the operation. | 1155  * \return A valid handle if no error occurs during the operation. | 
| 1086  */ | 1156  */ | 
| 1087 DART_EXPORT Dart_Handle Dart_HandleMessage(); | 1157 DART_EXPORT Dart_Handle Dart_HandleMessage(); | 
| 1088 | 1158 | 
| 1089 /** | 1159 /** | 
|  | 1160  * Handles all pending messages for the current isolate. | 
|  | 1161  * | 
|  | 1162  * May generate an unhandled exception error. | 
|  | 1163  * | 
|  | 1164  * \return A valid handle if no error occurs during the operation. | 
|  | 1165  */ | 
|  | 1166 DART_EXPORT Dart_Handle Dart_HandleMessages(); | 
|  | 1167 | 
|  | 1168 /** | 
| 1090  * Handles any pending messages for the vm service for the current | 1169  * Handles any pending messages for the vm service for the current | 
| 1091  * isolate. | 1170  * isolate. | 
| 1092  * | 1171  * | 
| 1093  * This function may be used by an embedder at a breakpoint to avoid | 1172  * This function may be used by an embedder at a breakpoint to avoid | 
| 1094  * pausing the vm service. | 1173  * pausing the vm service. | 
| 1095  * | 1174  * | 
| 1096  * This function can indirectly cause the message notify callback to | 1175  * This function can indirectly cause the message notify callback to | 
| 1097  * be called. | 1176  * be called. | 
| 1098  * | 1177  * | 
| 1099  * \return true if the vm service requests the program resume | 1178  * \return true if the vm service requests the program resume | 
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2853     intptr_t* vm_isolate_snapshot_size, | 2932     intptr_t* vm_isolate_snapshot_size, | 
| 2854     uint8_t** isolate_snapshot_buffer, | 2933     uint8_t** isolate_snapshot_buffer, | 
| 2855     intptr_t* isolate_snapshot_size, | 2934     intptr_t* isolate_snapshot_size, | 
| 2856     uint8_t** instructions_snapshot_buffer, | 2935     uint8_t** instructions_snapshot_buffer, | 
| 2857     intptr_t* instructions_snapshot_size); | 2936     intptr_t* instructions_snapshot_size); | 
| 2858 | 2937 | 
| 2859 | 2938 | 
| 2860 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); | 2939 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); | 
| 2861 | 2940 | 
| 2862 #endif  /* INCLUDE_DART_API_H_ */  /* NOLINT */ | 2941 #endif  /* INCLUDE_DART_API_H_ */  /* NOLINT */ | 
| OLD | NEW | 
|---|