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

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

Issue 1371193005: VM restart + shutdown fixes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more code review Created 5 years, 2 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 | « runtime/bin/main.cc ('k') | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 * 124 *
125 * An unhandled exception error provides access to an exception and 125 * An unhandled exception error provides access to an exception and
126 * stacktrace via the functions Dart_ErrorGetException and 126 * stacktrace via the functions Dart_ErrorGetException and
127 * Dart_ErrorGetStacktrace. 127 * Dart_ErrorGetStacktrace.
128 * 128 *
129 * - Compilation error handles are produced when, during the execution 129 * - Compilation error handles are produced when, during the execution
130 * of Dart code, a compile-time error occurs. As above, this can 130 * of Dart code, a compile-time error occurs. As above, this can
131 * occur in any function which triggers the execution of Dart code. 131 * occur in any function which triggers the execution of Dart code.
132 * 132 *
133 * - Fatal error handles are produced when the system wants to shut 133 * - Fatal error handles are produced when the system wants to shut
134 * down the current isolate. 134 * down the current isolate. Sometimes a fatal error may be a
135 * restart request (see Dart_IsRestartRequest). If the embedder does
136 * not support restarting the VM, then this should be treated as a
137 * normal fatal error.
135 * 138 *
136 * --- Propagating errors --- 139 * --- Propagating errors ---
137 * 140 *
138 * When an error handle is returned from the top level invocation of 141 * When an error handle is returned from the top level invocation of
139 * Dart code in a program, the embedder must handle the error as they 142 * Dart code in a program, the embedder must handle the error as they
140 * see fit. Often, the embedder will print the error message produced 143 * see fit. Often, the embedder will print the error message produced
141 * by Dart_Error and exit the program. 144 * by Dart_Error and exit the program.
142 * 145 *
143 * When an error is returned while in the body of a native function, 146 * When an error is returned while in the body of a native function,
144 * it can be propagated by calling Dart_PropagateError. Errors should 147 * it can be propagated by calling Dart_PropagateError. Errors should
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 * Is this a fatal error handle? 264 * Is this a fatal error handle?
262 * 265 *
263 * Fatal error handles are produced when the system wants to shut down 266 * Fatal error handles are produced when the system wants to shut down
264 * the current isolate. 267 * the current isolate.
265 * 268 *
266 * Requires there to be a current isolate. 269 * Requires there to be a current isolate.
267 */ 270 */
268 DART_EXPORT bool Dart_IsFatalError(Dart_Handle handle); 271 DART_EXPORT bool Dart_IsFatalError(Dart_Handle handle);
269 272
270 /** 273 /**
274 * Is this error a request to restart the VM?
275 *
276 * If an embedder chooses to support restarting the VM from tools
277 * (such as a debugger), then this function is used to distinguish
278 * restart requests from other fatal errors.
279 *
280 * Requires there to be a current isolate.
281 */
282 DART_EXPORT bool Dart_IsVMRestartRequest(Dart_Handle handle);
283
284 /**
271 * Gets the error message from an error handle. 285 * Gets the error message from an error handle.
272 * 286 *
273 * Requires there to be a current isolate. 287 * Requires there to be a current isolate.
274 * 288 *
275 * \return A C string containing an error message if the handle is 289 * \return A C string containing an error message if the handle is
276 * error. An empty C string ("") if the handle is valid. This C 290 * error. An empty C string ("") if the handle is valid. This C
277 * String is scope allocated and is only valid until the next call 291 * String is scope allocated and is only valid until the next call
278 * to Dart_ExitScope. 292 * to Dart_ExitScope.
279 */ 293 */
280 DART_EXPORT const char* Dart_GetError(Dart_Handle handle); 294 DART_EXPORT const char* Dart_GetError(Dart_Handle handle);
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2904 2918
2905 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( 2919 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot(
2906 uint8_t** vm_isolate_snapshot_buffer, 2920 uint8_t** vm_isolate_snapshot_buffer,
2907 intptr_t* vm_isolate_snapshot_size, 2921 intptr_t* vm_isolate_snapshot_size,
2908 uint8_t** isolate_snapshot_buffer, 2922 uint8_t** isolate_snapshot_buffer,
2909 intptr_t* isolate_snapshot_size, 2923 intptr_t* isolate_snapshot_size,
2910 uint8_t** instructions_snapshot_buffer, 2924 uint8_t** instructions_snapshot_buffer,
2911 intptr_t* instructions_snapshot_size); 2925 intptr_t* instructions_snapshot_size);
2912 2926
2913 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2927 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698