Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Side by Side Diff: runtime/include/dart_api.h

Issue 1655393004: Fix some API documentation bugs in new pause on start exit APIs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1081 * The VM's default message handler supports pausing an isolate before it
1082 * and before it exits. This is controlled by two VM flags: 1082 * processes the first message and right after the it processes the isolate's
1083 * final message. This can be controlled for all isolates by two VM flags:
1083 * 1084 *
1084 * `--pause-isolates-on-start` 1085 * `--pause-isolates-on-start`
1085 * `--pause-isolates-on-exit` 1086 * `--pause-isolates-on-exit`
1086 * 1087 *
1087 * When an embedder is using a Dart_MessageNotifyCallback the following 1088 * As well, Dart_SetShouldPauseOnStart and Dart_SetShouldPauseOnExit can be used
turnidge 2016/02/04 17:13:38 optional: "As well" -> "Additionally"
Cutch 2016/02/04 17:26:58 Done.
1088 * functions can be used to implement pausing on start and exit. 1089 * to control this pausing on a per-isolate basis.
turnidge 2016/02/04 17:13:38 opt: "pausing" -> "behavior"
Cutch 2016/02/04 17:26:58 Done.
1090 *
1091 * When an embedder is using a Dart_MessageNotifyCallback the embedder
1092 * needs to cooperate with the VM so that the service protocol can report
1093 * accurate information about isolates and so that tools such as debuggers
1094 * work reliably.
1095 *
1096 * The following functions can be used to implement pausing on start and exit.
1089 */ 1097 */
1090 1098
1091 /** 1099 /**
1092 * If the VM flag `--pause-isolates-on-start` was passed this will be true. 1100 * If the VM flag `--pause-isolates-on-start` was passed this will be true.
1093 * 1101 *
1094 * \return A boolean value indicating if pause on start was requested. 1102 * \return A boolean value indicating if pause on start was requested.
1095 */ 1103 */
1096 DART_EXPORT bool Dart_ShouldPauseOnStart(); 1104 DART_EXPORT bool Dart_ShouldPauseOnStart();
1097 1105
1098 /** 1106 /**
1099 * Override the VM flag `--pause-isolates-on-start` for the current isolate. 1107 * Override the VM flag `--pause-isolates-on-start` for the current isolate.
1100 * 1108 *
1109 * \param should_pause Should the isolate be paused on start?
1110 *
1101 * NOTE: This must be called before Dart_IsolateMakeRunnable. 1111 * NOTE: This must be called before Dart_IsolateMakeRunnable.
1102 */ 1112 */
1103 DART_EXPORT void Dart_SetShouldPauseOnStart(bool value); 1113 DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause);
1104 1114
1105 /** 1115 /**
1106 * Is the current isolate paused on start? 1116 * Is the current isolate paused on start?
1107 * 1117 *
1108 * \return A boolean value indicating if the isolate is paused on start. 1118 * \return A boolean value indicating if the isolate is paused on start.
1109 */ 1119 */
1110 DART_EXPORT bool Dart_IsPausedOnStart(); 1120 DART_EXPORT bool Dart_IsPausedOnStart();
1111 1121
1112 /** 1122 /**
1113 * Called when the embedder has paused the current isolate on start and when 1123 * Called when the embedder has paused the current isolate on start and when
1114 * the embedder has released the isolate. 1124 * the embedder has resumed the isolate.
1115 * 1125 *
1116 * \return A boolean value indicating if the isolate is paused on start. 1126 * \param paused Is the isolate paused on start?
1117 */ 1127 */
1118 DART_EXPORT void Dart_SetPausedOnStart(bool value); 1128 DART_EXPORT void Dart_SetPausedOnStart(bool paused);
1119 1129
1120 /** 1130 /**
1121 * If the VM flag `--pause-isolates-on-exit` was passed this will be true. 1131 * If the VM flag `--pause-isolates-on-exit` was passed this will be true.
1122 * 1132 *
1123 * \return A boolean value indicating if pause on start was requested. 1133 * \return A boolean value indicating if pause on exit was requested.
1124 */ 1134 */
1125 DART_EXPORT bool Dart_ShouldPauseOnExit(); 1135 DART_EXPORT bool Dart_ShouldPauseOnExit();
1126 1136
1127 /** 1137 /**
1128 * Override the VM flag `--pause-isolates-on-start` for the current isolate. 1138 * Override the VM flag `--pause-isolates-on-exit` for the current isolate.
1139 *
1140 * \param should_pause Should the isolate be paused on exit?
1129 * 1141 *
1130 * NOTE: This must be called before Dart_IsolateMakeRunnable. 1142 * NOTE: This must be called before Dart_IsolateMakeRunnable.
1131 */ 1143 */
1132 DART_EXPORT void Dart_SetShouldPauseOnExit(bool value); 1144 DART_EXPORT void Dart_SetShouldPauseOnExit(bool should_pause);
1133 1145
1134 /** 1146 /**
1135 * Is the current isolate paused on exit? 1147 * Is the current isolate paused on exit?
1136 * 1148 *
1137 * \return A boolean value indicating if the isolate is paused on start. 1149 * \return A boolean value indicating if the isolate is paused on exit.
1138 */ 1150 */
1139 DART_EXPORT bool Dart_IsPausedOnExit(); 1151 DART_EXPORT bool Dart_IsPausedOnExit();
1140 1152
1141 /** 1153 /**
1142 * Called when the embedder has paused the current isolate on start and when 1154 * Called when the embedder has paused the current isolate on exit and when
1143 * the embedder has released the isolate. 1155 * the embedder has resumed the isolate.
1144 * 1156 *
1145 * \return A boolean value indicating if the isolate is paused on start. 1157 * \param paused Is the isolate paused on exit?
1146 */ 1158 */
1147 DART_EXPORT void Dart_SetPausedOnExit(bool value); 1159 DART_EXPORT void Dart_SetPausedOnExit(bool paused);
1148 1160
1149 1161
1150 /** 1162 /**
1151 * Handles the next pending message for the current isolate. 1163 * Handles the next pending message for the current isolate.
1152 * 1164 *
1153 * May generate an unhandled exception error. 1165 * May generate an unhandled exception error.
1154 * 1166 *
1155 * \return A valid handle if no error occurs during the operation. 1167 * \return A valid handle if no error occurs during the operation.
1156 */ 1168 */
1157 DART_EXPORT Dart_Handle Dart_HandleMessage(); 1169 DART_EXPORT Dart_Handle Dart_HandleMessage();
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 intptr_t* vm_isolate_snapshot_size, 2944 intptr_t* vm_isolate_snapshot_size,
2933 uint8_t** isolate_snapshot_buffer, 2945 uint8_t** isolate_snapshot_buffer,
2934 intptr_t* isolate_snapshot_size, 2946 intptr_t* isolate_snapshot_size,
2935 uint8_t** instructions_snapshot_buffer, 2947 uint8_t** instructions_snapshot_buffer,
2936 intptr_t* instructions_snapshot_size); 2948 intptr_t* instructions_snapshot_size);
2937 2949
2938 2950
2939 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); 2951 DART_EXPORT bool Dart_IsRunningPrecompiledCode();
2940 2952
2941 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2953 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698