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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 */ | 192 */ |
193 typedef struct _Dart_Handle* Dart_Handle; | 193 typedef struct _Dart_Handle* Dart_Handle; |
194 typedef Dart_Handle Dart_PersistentHandle; | 194 typedef Dart_Handle Dart_PersistentHandle; |
195 typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; | 195 typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; |
196 | 196 |
197 typedef void (*Dart_WeakPersistentHandleFinalizer)( | 197 typedef void (*Dart_WeakPersistentHandleFinalizer)( |
198 Dart_WeakPersistentHandle handle, | 198 Dart_WeakPersistentHandle handle, |
199 void* peer); | 199 void* peer); |
200 typedef void (*Dart_PeerFinalizer)(void* peer); | 200 typedef void (*Dart_PeerFinalizer)(void* peer); |
201 | 201 |
202 typedef struct _Dart_ExceptionStackTrace* Dart_ExceptionStackTrace; | |
rmacnak
2013/11/07 21:31:12
This is a bad name considering the Dart_CurrentSta
| |
203 | |
202 /** | 204 /** |
203 * Is this an error handle? | 205 * Is this an error handle? |
204 * | 206 * |
205 * Requires there to be a current isolate. | 207 * Requires there to be a current isolate. |
206 */ | 208 */ |
207 DART_EXPORT bool Dart_IsError(Dart_Handle handle); | 209 DART_EXPORT bool Dart_IsError(Dart_Handle handle); |
208 | 210 |
209 /** | 211 /** |
210 * Is this an api error handle? | 212 * Is this an api error handle? |
211 * | 213 * |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 */ | 271 */ |
270 DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); | 272 DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); |
271 | 273 |
272 /** | 274 /** |
273 * Gets the exception Object from an unhandled exception error handle. | 275 * Gets the exception Object from an unhandled exception error handle. |
274 */ | 276 */ |
275 DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); | 277 DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); |
276 | 278 |
277 /** | 279 /** |
278 * Gets the stack trace Object from an unhandled exception error handle. | 280 * Gets the stack trace Object from an unhandled exception error handle. |
281 * | |
282 * \param handle An unhandled exception error. | |
283 * \param trace Receives the stack trace. | |
284 * | |
285 * \return A valid handle if no error occurs during the operation. | |
279 */ | 286 */ |
280 DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace(Dart_Handle handle); | 287 DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace( |
rmacnak
2013/11/07 21:31:12
Note this no longer provides access to dart:core.S
| |
288 Dart_Handle handle, | |
289 Dart_ExceptionStackTrace *trace); | |
290 DART_EXPORT Dart_Handle Dart_CurrentStacktrace( | |
291 Dart_ExceptionStackTrace *trace); | |
292 | |
293 /** | |
294 * Gets the number of frames in a stack trace. | |
295 * | |
296 * \param trace The stack trace. | |
297 * \param length Receives the frame count. | |
298 * | |
299 * \return A valid handle if no error occurs during the operation. | |
300 */ | |
301 DART_EXPORT Dart_Handle Dart_StacktraceLength(Dart_ExceptionStackTrace trace, | |
302 intptr_t* length); | |
303 | |
304 /** | |
305 * Returns information about a given frame in a stack trace | |
306 * | |
307 * \param trace The stack trace. | |
308 * \param frame_index The position of the frame in the stacktrace. Top-of-stack | |
309 * is at position 0. | |
310 * | |
311 * \param function_name receives a string handle with the qualified function | |
312 * name. | |
313 * \param script_url receives a string handle with the url of the source script | |
314 * that contains the frame's function. | |
315 * \param line_number receives the line number in the script. | |
316 * \param column_number receives the column number in the script, or -1 if | |
317 * precise source locations are not available. | |
318 * | |
319 * Any or all of the out parameters above may be NULL. | |
320 * | |
321 * Requires there to be a current isolate. | |
322 * | |
323 * \return A valid handle if no error occurs during the operation. | |
324 */ | |
325 DART_EXPORT Dart_Handle Dart_StacktraceFrameInfo( | |
326 Dart_ExceptionStackTrace trace, | |
327 intptr_t frame_index, | |
328 Dart_Handle* function_name, | |
329 Dart_Handle* script_url, | |
330 intptr_t* line_number, | |
331 intptr_t* column_number); | |
332 | |
281 | 333 |
282 /** | 334 /** |
283 * Produces an api error handle with the provided error message. | 335 * Produces an api error handle with the provided error message. |
284 * | 336 * |
285 * Requires there to be a current isolate. | 337 * Requires there to be a current isolate. |
286 * | 338 * |
287 * \param error the error message. | 339 * \param error the error message. |
288 */ | 340 */ |
289 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); | 341 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); |
290 | 342 |
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2339 * | 2391 * |
2340 * \param object An object. | 2392 * \param object An object. |
2341 * \param peer A value to store in the peer field. | 2393 * \param peer A value to store in the peer field. |
2342 * | 2394 * |
2343 * \return Returns an error if 'object' is a subtype of Null, num, or | 2395 * \return Returns an error if 'object' is a subtype of Null, num, or |
2344 * bool. | 2396 * bool. |
2345 */ | 2397 */ |
2346 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2398 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2347 | 2399 |
2348 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2400 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |