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. |