Chromium Code Reviews| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 869 DART_EXPORT void Dart_ShutdownIsolate(); | 869 DART_EXPORT void Dart_ShutdownIsolate(); |
| 870 /* TODO(turnidge): Document behavior when there is no current isolate. */ | 870 /* TODO(turnidge): Document behavior when there is no current isolate. */ |
| 871 | 871 |
| 872 /** | 872 /** |
| 873 * Returns the current isolate. Will return NULL if there is no | 873 * Returns the current isolate. Will return NULL if there is no |
| 874 * current isolate. | 874 * current isolate. |
| 875 */ | 875 */ |
| 876 DART_EXPORT Dart_Isolate Dart_CurrentIsolate(); | 876 DART_EXPORT Dart_Isolate Dart_CurrentIsolate(); |
| 877 | 877 |
| 878 /** | 878 /** |
| 879 * Returns the callback data which was passed to the isolate when it | 879 * Returns the callback data associated with the current Isolate. This data was |
| 880 * was created. | 880 * passed to the isolate when it was created. |
| 881 */ | 881 */ |
| 882 DART_EXPORT void* Dart_CurrentIsolateData(); | 882 DART_EXPORT void* Dart_CurrentIsolateData(); |
| 883 | 883 |
| 884 /** | 884 /** |
| 885 * Returns the callback data associated with the specified Isolate. This data | |
| 886 * was passed to the isolate when it was created. | |
| 887 * The embedder is responsible for ensuring that the consistency of this data | |
| 888 * with respect to the lifecycle of an Isolate. | |
| 889 */ | |
| 890 DART_EXPORT void* Dart_IsolateData(Dart_Isolate isolate); | |
| 891 | |
| 892 /** | |
| 885 * Returns the debugging name for the current isolate. | 893 * Returns the debugging name for the current isolate. |
| 886 * | 894 * |
| 887 * This name is unique to each isolate and should only be used to make | 895 * This name is unique to each isolate and should only be used to make |
| 888 * debugging messages more comprehensible. | 896 * debugging messages more comprehensible. |
| 889 */ | 897 */ |
| 890 DART_EXPORT Dart_Handle Dart_DebugName(); | 898 DART_EXPORT Dart_Handle Dart_DebugName(); |
| 891 | 899 |
| 892 /** | 900 /** |
| 893 * Enters an isolate. After calling this function, | 901 * Enters an isolate. After calling this function, |
| 894 * the current isolate will be set to the provided isolate. | 902 * the current isolate will be set to the provided isolate. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 992 */ | 1000 */ |
| 993 #define ILLEGAL_PORT ((Dart_Port) 0) | 1001 #define ILLEGAL_PORT ((Dart_Port) 0) |
| 994 | 1002 |
| 995 /** | 1003 /** |
| 996 * A message notification callback. | 1004 * A message notification callback. |
| 997 * | 1005 * |
| 998 * This callback allows the embedder to provide an alternate wakeup | 1006 * This callback allows the embedder to provide an alternate wakeup |
| 999 * mechanism for the delivery of inter-isolate messages. It is the | 1007 * mechanism for the delivery of inter-isolate messages. It is the |
| 1000 * responsibility of the embedder to call Dart_HandleMessage to | 1008 * responsibility of the embedder to call Dart_HandleMessage to |
| 1001 * process the message. | 1009 * process the message. |
| 1010 * | |
|
Ivan Posva
2014/02/07 00:17:46
I don't think we should state this here since we m
siva
2014/02/07 00:35:42
Removed.
On 2014/02/07 00:17:46, Ivan Posva wrote
| |
| 1011 * The VM guarantees that the destination isolate 'dest_isolate' will not | |
| 1012 * be shutdown while this callback is executed. | |
| 1002 */ | 1013 */ |
| 1003 typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate); | 1014 typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate); |
| 1004 | 1015 |
| 1005 /** | 1016 /** |
| 1006 * Allows embedders to provide an alternative wakeup mechanism for the | 1017 * Allows embedders to provide an alternative wakeup mechanism for the |
| 1007 * delivery of inter-isolate messages. This setting only applies to | 1018 * delivery of inter-isolate messages. This setting only applies to |
| 1008 * the current isolate. | 1019 * the current isolate. |
| 1009 * | 1020 * |
| 1010 * Most embedders will only call this function once, before isolate | 1021 * Most embedders will only call this function once, before isolate |
| 1011 * execution begins. If this function is called after isolate | 1022 * execution begins. If this function is called after isolate |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2451 * be loaded in and the isolate can be run by the embedder. | 2462 * be loaded in and the isolate can be run by the embedder. |
| 2452 * | 2463 * |
| 2453 * NOTE: It is not safe to call this from multiple threads concurrently. | 2464 * NOTE: It is not safe to call this from multiple threads concurrently. |
| 2454 * | 2465 * |
| 2455 * \return Returns NULL if an error occurred. | 2466 * \return Returns NULL if an error occurred. |
| 2456 */ | 2467 */ |
| 2457 DART_EXPORT Dart_Isolate Dart_GetServiceIsolate(void* callback_data); | 2468 DART_EXPORT Dart_Isolate Dart_GetServiceIsolate(void* callback_data); |
| 2458 | 2469 |
| 2459 | 2470 |
| 2460 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2471 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |