Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef INCLUDE_DART_API_H_ | 5 #ifndef INCLUDE_DART_API_H_ |
| 6 #define INCLUDE_DART_API_H_ | 6 #define INCLUDE_DART_API_H_ |
| 7 | 7 |
| 8 /** \mainpage Dart Embedding API Reference | 8 /** \mainpage Dart Embedding API Reference |
| 9 * | 9 * |
| 10 * Dart is a class-based programming language for creating structured | 10 * Dart is a class-based programming language for creating structured |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 * invalid. An empty C string ("") if the handle is valid. This C | 114 * invalid. An empty C string ("") if the handle is valid. This C |
| 115 * String is scope allocated and is only valid until the next call | 115 * String is scope allocated and is only valid until the next call |
| 116 * to Dart_ExitScope. | 116 * to Dart_ExitScope. |
| 117 */ | 117 */ |
| 118 DART_EXPORT const char* Dart_GetError(const Dart_Handle& handle); | 118 DART_EXPORT const char* Dart_GetError(const Dart_Handle& handle); |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Produces an invalid handle with the provided error message. | 121 * Produces an invalid handle with the provided error message. |
| 122 * | 122 * |
| 123 * This function makes its own copy of the error message and does not | 123 * This function makes its own copy of the error message and does not |
| 124 * claim ownership of the 'error' parameter. | 124 * claim ownership of the 'error' parameter. |
|
siva
2011/11/07 23:20:50
The comment is out of date now as there is no expl
turnidge
2011/11/07 23:55:35
Got rid of the comment. Nobody expects printf to
| |
| 125 * | 125 * |
| 126 * Requires there to be a current isolate. | 126 * Requires there to be a current isolate. |
| 127 * | 127 * |
| 128 * \param error A C string containing an error message. | 128 * \param error A C string containing an error message. |
| 129 */ | 129 */ |
| 130 DART_EXPORT Dart_Handle Dart_Error(const char* error); | 130 DART_EXPORT Dart_Handle Dart_Error(const char* format, ...); |
| 131 // TODO(turnidge): Accept printf-style args here. | |
| 132 | 131 |
| 133 /** | 132 /** |
| 134 * Allocates a persistent handle for an object. | 133 * Allocates a persistent handle for an object. |
| 135 * | 134 * |
| 136 * This handle has the lifetime of the current isolate unless it is | 135 * This handle has the lifetime of the current isolate unless it is |
| 137 * explicitly deallocated by calling Dart_DeletePersistentHandle. | 136 * explicitly deallocated by calling Dart_DeletePersistentHandle. |
| 138 * | 137 * |
| 139 * Requires there to be a current isolate. | 138 * Requires there to be a current isolate. |
| 140 */ | 139 */ |
| 141 DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object); | 140 DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object); |
| (...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1135 | 1134 |
| 1136 // --- Profiling support ---- | 1135 // --- Profiling support ---- |
| 1137 | 1136 |
| 1138 // External pprof support for gathering and dumping symbolic | 1137 // External pprof support for gathering and dumping symbolic |
| 1139 // information that can be used for better profile reports for | 1138 // information that can be used for better profile reports for |
| 1140 // dynamically generated code. | 1139 // dynamically generated code. |
| 1141 DART_EXPORT void Dart_InitPprofSupport(); | 1140 DART_EXPORT void Dart_InitPprofSupport(); |
| 1142 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1141 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1143 | 1142 |
| 1144 #endif // INCLUDE_DART_API_H_ | 1143 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |