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

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

Issue 1807293002: - Fix for issue 25950 (add registration of a thread exit callback) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-review-comments Created 4 years, 9 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/run_vm_tests.cc ('k') | runtime/lib/math.cc » ('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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 * This function should be used to dispose of native resources that 714 * This function should be used to dispose of native resources that
715 * are allocated to an isolate in order to avoid leaks. 715 * are allocated to an isolate in order to avoid leaks.
716 * 716 *
717 * \param callback_data The same callback data which was passed to the 717 * \param callback_data The same callback data which was passed to the
718 * isolate when it was created. 718 * isolate when it was created.
719 * 719 *
720 */ 720 */
721 typedef void (*Dart_IsolateShutdownCallback)(void* callback_data); 721 typedef void (*Dart_IsolateShutdownCallback)(void* callback_data);
722 722
723 /** 723 /**
724 * A thread death callback function.
725 * This callback, provided by the embedder, is called before a thread in the
726 * vm thread pool exits.
727 * This function could be used to dispose of native resources that
728 * are associated and attached to the thread, in order to avoid leaks.
729 */
730 typedef void (*Dart_ThreadExitCallback)();
731
732 /**
724 * Callbacks provided by the embedder for file operations. If the 733 * Callbacks provided by the embedder for file operations. If the
725 * embedder does not allow file operations these callbacks can be 734 * embedder does not allow file operations these callbacks can be
726 * NULL. 735 * NULL.
727 * 736 *
728 * Dart_FileOpenCallback - opens a file for reading or writing. 737 * Dart_FileOpenCallback - opens a file for reading or writing.
729 * \param name The name of the file to open. 738 * \param name The name of the file to open.
730 * \param write A boolean variable which indicates if the file is to 739 * \param write A boolean variable which indicates if the file is to
731 * opened for writing. If there is an existing file it needs to truncated. 740 * opened for writing. If there is an existing file it needs to truncated.
732 * 741 *
733 * Dart_FileReadCallback - Read contents of file. 742 * Dart_FileReadCallback - Read contents of file.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 * otherwise. The caller is responsible for freeing the error message. 804 * otherwise. The caller is responsible for freeing the error message.
796 */ 805 */
797 DART_EXPORT char* Dart_Initialize( 806 DART_EXPORT char* Dart_Initialize(
798 const uint8_t* vm_isolate_snapshot, 807 const uint8_t* vm_isolate_snapshot,
799 const uint8_t* instructions_snapshot, 808 const uint8_t* instructions_snapshot,
800 const uint8_t* data_snapshot, 809 const uint8_t* data_snapshot,
801 Dart_IsolateCreateCallback create, 810 Dart_IsolateCreateCallback create,
802 Dart_IsolateInterruptCallback interrupt, 811 Dart_IsolateInterruptCallback interrupt,
803 Dart_IsolateUnhandledExceptionCallback unhandled_exception, 812 Dart_IsolateUnhandledExceptionCallback unhandled_exception,
804 Dart_IsolateShutdownCallback shutdown, 813 Dart_IsolateShutdownCallback shutdown,
814 Dart_ThreadExitCallback thread_exit,
805 Dart_FileOpenCallback file_open, 815 Dart_FileOpenCallback file_open,
806 Dart_FileReadCallback file_read, 816 Dart_FileReadCallback file_read,
807 Dart_FileWriteCallback file_write, 817 Dart_FileWriteCallback file_write,
808 Dart_FileCloseCallback file_close, 818 Dart_FileCloseCallback file_close,
809 Dart_EntropySource entropy_source, 819 Dart_EntropySource entropy_source,
810 Dart_GetVMServiceAssetsArchive get_service_assets); 820 Dart_GetVMServiceAssetsArchive get_service_assets);
811 821
812 /** 822 /**
813 * Cleanup state in the VM before process termination. 823 * Cleanup state in the VM before process termination.
814 * 824 *
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 intptr_t* vm_isolate_snapshot_size, 2961 intptr_t* vm_isolate_snapshot_size,
2952 uint8_t** isolate_snapshot_buffer, 2962 uint8_t** isolate_snapshot_buffer,
2953 intptr_t* isolate_snapshot_size, 2963 intptr_t* isolate_snapshot_size,
2954 uint8_t** instructions_snapshot_buffer, 2964 uint8_t** instructions_snapshot_buffer,
2955 intptr_t* instructions_snapshot_size); 2965 intptr_t* instructions_snapshot_size);
2956 2966
2957 2967
2958 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); 2968 DART_EXPORT bool Dart_IsRunningPrecompiledCode();
2959 2969
2960 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2970 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « runtime/bin/run_vm_tests.cc ('k') | runtime/lib/math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698