OLD | NEW |
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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 const char* main, | 644 const char* main, |
645 const char* package_root, | 645 const char* package_root, |
646 const char** package_map, | 646 const char** package_map, |
647 Dart_IsolateFlags* flags, | 647 Dart_IsolateFlags* flags, |
648 void* callback_data, | 648 void* callback_data, |
649 char** error); | 649 char** error); |
650 | 650 |
651 /** | 651 /** |
652 * An isolate interrupt callback function. | 652 * An isolate interrupt callback function. |
653 * | 653 * |
654 * This callback, provided by the embedder, is called when an isolate | 654 * This callback has been DEPRECATED. |
655 * is interrupted as a result of a call to Dart_InterruptIsolate(). | |
656 * When the callback is called, Dart_CurrentIsolate can be used to | |
657 * figure out which isolate is being interrupted. | |
658 * | |
659 * \return The embedder returns true if the isolate should continue | |
660 * execution. If the embedder returns false, the isolate will be | |
661 * unwound (currently unimplemented). | |
662 */ | 655 */ |
663 typedef bool (*Dart_IsolateInterruptCallback)(); | 656 typedef bool (*Dart_IsolateInterruptCallback)(); |
664 /* TODO(turnidge): Define and implement unwinding. */ | |
665 | 657 |
666 /** | 658 /** |
667 * An isolate unhandled exception callback function. | 659 * An isolate unhandled exception callback function. |
668 * | 660 * |
669 * This callback, provided by the embedder, is called when an unhandled | 661 * This callback has been DEPRECATED. |
670 * exception or internal error is thrown during isolate execution. When the | |
671 * callback is invoked, Dart_CurrentIsolate can be used to figure out which | |
672 * isolate was running when the exception was thrown. | |
673 * | |
674 * \param error The unhandled exception or error. This handle's scope is | |
675 * only valid until the embedder returns from this callback. | |
676 */ | 662 */ |
677 typedef void (*Dart_IsolateUnhandledExceptionCallback)(Dart_Handle error); | 663 typedef void (*Dart_IsolateUnhandledExceptionCallback)(Dart_Handle error); |
678 | 664 |
679 /** | 665 /** |
680 * An isolate shutdown callback function. | 666 * An isolate shutdown callback function. |
681 * | 667 * |
682 * This callback, provided by the embedder, is called before the vm | 668 * This callback, provided by the embedder, is called before the vm |
683 * shuts down an isolate. The isolate being shutdown will be the current | 669 * shuts down an isolate. The isolate being shutdown will be the current |
684 * isolate. It is safe to run Dart code. | 670 * isolate. It is safe to run Dart code. |
685 * | 671 * |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 | 733 |
748 /** | 734 /** |
749 * Initializes the VM. | 735 * Initializes the VM. |
750 * | 736 * |
751 * \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate | 737 * \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate |
752 * or NULL if no snapshot is provided. | 738 * or NULL if no snapshot is provided. |
753 * \param instructions_snapshot A buffer containing a snapshot of precompiled | 739 * \param instructions_snapshot A buffer containing a snapshot of precompiled |
754 * instructions, or NULL if no snapshot is provided. | 740 * instructions, or NULL if no snapshot is provided. |
755 * \param create A function to be called during isolate creation. | 741 * \param create A function to be called during isolate creation. |
756 * See Dart_IsolateCreateCallback. | 742 * See Dart_IsolateCreateCallback. |
757 * \param interrupt A function to be called when an isolate is interrupted. | 743 * \param interrupt This parameter has been DEPRECATED. |
758 * See Dart_IsolateInterruptCallback. | 744 * \param unhandled_exception This parameter has been DEPRECATED. |
759 * \param unhandled_exception A function to be called if an isolate has an | |
760 * unhandled exception. Set Dart_IsolateUnhandledExceptionCallback. | |
761 * \param shutdown A function to be called when an isolate is shutdown. | 745 * \param shutdown A function to be called when an isolate is shutdown. |
762 * See Dart_IsolateShutdownCallback. | 746 * See Dart_IsolateShutdownCallback. |
763 * | 747 * |
764 * \param get_service_assets A function to be called by the service isolate when | 748 * \param get_service_assets A function to be called by the service isolate when |
765 * it requires the vmservice assets archive. | 749 * it requires the vmservice assets archive. |
766 * See Dart_GetVMServiceAssetsArchive. | 750 * See Dart_GetVMServiceAssetsArchive. |
767 * | 751 * |
768 * \return NULL if initialization is successful. Returns an error message | 752 * \return NULL if initialization is successful. Returns an error message |
769 * otherwise. The caller is responsible for freeing the error message. | 753 * otherwise. The caller is responsible for freeing the error message. |
770 */ | 754 */ |
(...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2829 | 2813 |
2830 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( | 2814 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( |
2831 uint8_t** vm_isolate_snapshot_buffer, | 2815 uint8_t** vm_isolate_snapshot_buffer, |
2832 intptr_t* vm_isolate_snapshot_size, | 2816 intptr_t* vm_isolate_snapshot_size, |
2833 uint8_t** isolate_snapshot_buffer, | 2817 uint8_t** isolate_snapshot_buffer, |
2834 intptr_t* isolate_snapshot_size, | 2818 intptr_t* isolate_snapshot_size, |
2835 uint8_t** instructions_snapshot_buffer, | 2819 uint8_t** instructions_snapshot_buffer, |
2836 intptr_t* instructions_snapshot_size); | 2820 intptr_t* instructions_snapshot_size); |
2837 | 2821 |
2838 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2822 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |