| Index: include/dart_api.h
|
| ===================================================================
|
| --- include/dart_api.h (revision 7933)
|
| +++ include/dart_api.h (working copy)
|
| @@ -435,8 +435,6 @@
|
| * When the callback is called, Dart_CurrentIsolate can be used to
|
| * figure out which isolate is being interrupted.
|
| *
|
| - * \param current_isolate The isolate being interrupted.
|
| - *
|
| * \return The embedder returns true if the isolate should continue
|
| * execution. If the embedder returns false, the isolate will be
|
| * unwound (currently unimplemented).
|
| @@ -445,6 +443,26 @@
|
| // TODO(turnidge): Define and implement unwinding.
|
|
|
| /**
|
| + * An isolate shutdown callback function.
|
| + *
|
| + * This callback, provided by the embedder, is called when the vm
|
| + * shuts down an isolate.
|
| + *
|
| + * The isolate may be in the process of shutting down due to an
|
| + * unrecoverable error, so it is not safe to enter the isolate or use
|
| + * it to run any Dart code. No further Dart code will be run on this
|
| + * isolate by the vm.
|
| + *
|
| + * This function should be used to dispose of native resources that
|
| + * are allocated to an isolate in order to avoid leaks.
|
| + *
|
| + * \param callback_data The same callback data which was passed to the
|
| + * isolate when it was created.
|
| + *
|
| + */
|
| +typedef void (*Dart_IsolateShutdownCallback)(void* callback_data);
|
| +
|
| +/**
|
| * Initializes the VM.
|
| *
|
| * \param create A function to be called during isolate creation.
|
| @@ -455,7 +473,8 @@
|
| * \return True if initialization is successful.
|
| */
|
| DART_EXPORT bool Dart_Initialize(Dart_IsolateCreateCallback create,
|
| - Dart_IsolateInterruptCallback interrupt);
|
| + Dart_IsolateInterruptCallback interrupt,
|
| + Dart_IsolateShutdownCallback shutdown);
|
|
|
| /**
|
| * Sets command line flags. Should be called before Dart_Initialize.
|
|
|