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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 272 /** | 272 /** |
| 273 * Gets the exception Object from an unhandled exception error handle. | 273 * Gets the exception Object from an unhandled exception error handle. |
| 274 */ | 274 */ |
| 275 DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); | 275 DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); |
| 276 | 276 |
| 277 /** | 277 /** |
| 278 * Gets the stack trace Object from an unhandled exception error handle. | 278 * Gets the stack trace Object from an unhandled exception error handle. |
| 279 */ | 279 */ |
| 280 DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace(Dart_Handle handle); | 280 DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace(Dart_Handle handle); |
| 281 | 281 |
| 282 | |
| 283 /** | |
| 284 * Gets the number of frames in a Stacktrace. | |
| 285 * | |
| 286 * \param handle A Stacktrace. | |
|
siva
2013/10/31 17:13:26
maybe call it handle instead of stacktrace.
| |
| 287 * \param length Returns the frame count. | |
| 288 * | |
| 289 * \return A valid handle if no error occurs during the operation. | |
| 290 */ | |
| 291 DART_EXPORT Dart_Handle Dart_StacktraceLength(Dart_Handle handle, | |
| 292 intptr_t* length); | |
| 293 | |
| 294 /** | |
| 295 * Returns information about a given frame in a Stacktrace | |
| 296 * | |
| 297 * \param handle A Stacktrace. | |
|
siva
2013/10/31 17:13:26
Ditto comment.
| |
| 298 * \param frame_index The position of the frame of the stack. Top-of-stack is at | |
| 299 * position 0. | |
|
siva
2013/10/31 17:13:26
position of the frame in the stacktrace?
| |
| 300 * | |
| 301 * \param function_name receives a string handle with the qualified function | |
| 302 * name. | |
| 303 * \param script_url receives a string handle with the url of the source script | |
| 304 * that contains the frame's function. | |
| 305 * \param line_number receives the line number in the script. | |
| 306 * \param column_number receives the column number in the script, or -1 if | |
| 307 * precise source locations are not available. | |
| 308 * | |
| 309 * Any or all of the out parameters above may be NULL. | |
| 310 * | |
| 311 * Requires there to be a current isolate. | |
| 312 * | |
| 313 * \return A valid handle if no error occurs during the operation. | |
| 314 */ | |
| 315 DART_EXPORT Dart_Handle Dart_StacktraceFrameInfo( | |
| 316 Dart_Handle handle, | |
| 317 intptr_t frame_index, | |
| 318 Dart_Handle* function_name, | |
| 319 Dart_Handle* script_url, | |
| 320 intptr_t* line_number, | |
| 321 intptr_t* column_number); | |
| 322 | |
| 323 | |
| 282 /** | 324 /** |
| 283 * Produces an api error handle with the provided error message. | 325 * Produces an api error handle with the provided error message. |
| 284 * | 326 * |
| 285 * Requires there to be a current isolate. | 327 * Requires there to be a current isolate. |
| 286 * | 328 * |
| 287 * \param error the error message. | 329 * \param error the error message. |
| 288 */ | 330 */ |
| 289 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); | 331 DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); |
| 290 | 332 |
| 291 /** | 333 /** |
| (...skipping 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2312 * | 2354 * |
| 2313 * \param object An object. | 2355 * \param object An object. |
| 2314 * \param peer A value to store in the peer field. | 2356 * \param peer A value to store in the peer field. |
| 2315 * | 2357 * |
| 2316 * \return Returns an error if 'object' is a subtype of Null, num, or | 2358 * \return Returns an error if 'object' is a subtype of Null, num, or |
| 2317 * bool. | 2359 * bool. |
| 2318 */ | 2360 */ |
| 2319 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2361 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
| 2320 | 2362 |
| 2321 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2363 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |