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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index ae9e1d20623b82f154ffaa17004c09cd2c9e17c2..c565895143f4917aa1ada80de7afee8c7542d106 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -131,7 +131,10 @@ typedef struct _Dart_Isolate* Dart_Isolate;
* occur in any function which triggers the execution of Dart code.
*
* - Fatal error handles are produced when the system wants to shut
- * down the current isolate.
+ * down the current isolate. Sometimes a fatal error may be a
+ * restart request (see Dart_IsRestartRequest). If the embedder does
+ * not support restarting the VM, then this should be treated as a
+ * normal fatal error.
*
* --- Propagating errors ---
*
@@ -268,6 +271,17 @@ DART_EXPORT bool Dart_IsCompilationError(Dart_Handle handle);
DART_EXPORT bool Dart_IsFatalError(Dart_Handle handle);
/**
+ * Is this error a request to restart the VM?
+ *
+ * If an embedder chooses to support restarting the VM from tools
+ * (such as a debugger), then this function is used to distinguish
+ * restart requests from other fatal errors.
+ *
+ * Requires there to be a current isolate.
+ */
+DART_EXPORT bool Dart_IsVMRestartRequest(Dart_Handle handle);
+
+/**
* Gets the error message from an error handle.
*
* Requires there to be a current isolate.
« 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