Chromium Code Reviews| Index: runtime/include/dart_api.h |
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
| index 805737c50417d4fcbb13b6add6b48c06b3dd9e4d..4039f49e54b8c2163fe20b21afd76da814fef248 100755 |
| --- a/runtime/include/dart_api.h |
| +++ b/runtime/include/dart_api.h |
| @@ -199,6 +199,8 @@ typedef void (*Dart_WeakPersistentHandleFinalizer)( |
| void* peer); |
| typedef void (*Dart_PeerFinalizer)(void* peer); |
| +typedef struct _Dart_ExceptionStackTrace* Dart_ExceptionStackTrace; |
|
rmacnak
2013/11/07 21:31:12
This is a bad name considering the Dart_CurrentSta
|
| + |
| /** |
| * Is this an error handle? |
| * |
| @@ -276,8 +278,58 @@ DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); |
| /** |
| * Gets the stack trace Object from an unhandled exception error handle. |
| + * |
| + * \param handle An unhandled exception error. |
| + * \param trace Receives the stack trace. |
| + * |
| + * \return A valid handle if no error occurs during the operation. |
| */ |
| -DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace(Dart_Handle handle); |
| +DART_EXPORT Dart_Handle Dart_ErrorGetStacktrace( |
|
rmacnak
2013/11/07 21:31:12
Note this no longer provides access to dart:core.S
|
| + Dart_Handle handle, |
| + Dart_ExceptionStackTrace *trace); |
| +DART_EXPORT Dart_Handle Dart_CurrentStacktrace( |
| + Dart_ExceptionStackTrace *trace); |
| + |
| +/** |
| + * Gets the number of frames in a stack trace. |
| + * |
| + * \param trace The stack trace. |
| + * \param length Receives the frame count. |
| + * |
| + * \return A valid handle if no error occurs during the operation. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_StacktraceLength(Dart_ExceptionStackTrace trace, |
| + intptr_t* length); |
| + |
| +/** |
| + * Returns information about a given frame in a stack trace |
| + * |
| + * \param trace The stack trace. |
| + * \param frame_index The position of the frame in the stacktrace. Top-of-stack |
| + * is at position 0. |
| + * |
| + * \param function_name receives a string handle with the qualified function |
| + * name. |
| + * \param script_url receives a string handle with the url of the source script |
| + * that contains the frame's function. |
| + * \param line_number receives the line number in the script. |
| + * \param column_number receives the column number in the script, or -1 if |
| + * precise source locations are not available. |
| + * |
| + * Any or all of the out parameters above may be NULL. |
| + * |
| + * Requires there to be a current isolate. |
| + * |
| + * \return A valid handle if no error occurs during the operation. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_StacktraceFrameInfo( |
| + Dart_ExceptionStackTrace trace, |
| + intptr_t frame_index, |
| + Dart_Handle* function_name, |
| + Dart_Handle* script_url, |
| + intptr_t* line_number, |
| + intptr_t* column_number); |
| + |
| /** |
| * Produces an api error handle with the provided error message. |