|
V8 Project
|
Representation of a JavaScript stack trace. More...
#include <v8.h>
Collaboration diagram for v8::StackTrace:Public Types | |
| enum | StackTraceOptions { kLineNumber = 1 , kColumnOffset = 1 << 1 | kLineNumber , kScriptName = 1 << 2 , kFunctionName = 1 << 3 , kIsEval = 1 << 4 , kIsConstructor = 1 << 5 , kScriptNameOrSourceURL = 1 << 6 , kScriptId = 1 << 7 , kExposeFramesAcrossSecurityOrigins = 1 << 8 , kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName , kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL } |
| Flags that determine what information is placed captured for each StackFrame when grabbing the current stack trace. More... | |
Public Member Functions | |
| Local< StackFrame > | GetFrame (uint32_t index) const |
| Returns a StackFrame at a particular index. More... | |
| int | GetFrameCount () const |
| Returns the number of StackFrames. More... | |
| Local< Array > | AsArray () |
| Returns StackTrace as a v8::Array that contains StackFrame objects. More... | |
Static Public Member Functions | |
| static Local< StackTrace > | CurrentStackTrace (Isolate *isolate, int frame_limit, StackTraceOptions options=kOverview) |
| Grab a snapshot of the current JavaScript execution stack. More... | |
Representation of a JavaScript stack trace.
The information collected is a snapshot of the execution stack and the information remains valid after execution continues.
Flags that determine what information is placed captured for each StackFrame when grabbing the current stack trace.
| Enumerator | |
|---|---|
| kLineNumber | |
| kColumnOffset | |
| kScriptName | |
| kFunctionName | |
| kIsEval | |
| kIsConstructor | |
| kScriptNameOrSourceURL | |
| kScriptId | |
| kExposeFramesAcrossSecurityOrigins | |
| kOverview | |
| kDetailed | |
Definition at line 1312 of file v8.h.
Returns StackTrace as a v8::Array that contains StackFrame objects.
Definition at line 2265 of file api.cc.
References ENTER_V8, v8::Utils::OpenHandle(), and v8::Utils::ToLocal().
Here is the call graph for this function:
|
static |
Grab a snapshot of the current JavaScript execution stack.
| frame_limit | The maximum number of stack frames we want to capture. |
| options | Enumerates the set of things we will capture for each StackFrame. |
Definition at line 2272 of file api.cc.
References v8::internal::Isolate::CaptureCurrentStackTrace(), ENTER_V8, kExposeFramesAcrossSecurityOrigins, and v8::Utils::StackTraceToLocal().
Here is the call graph for this function:| Local< StackFrame > v8::StackTrace::GetFrame | ( | uint32_t | index | ) | const |
Returns a StackFrame at a particular index.
Definition at line 2246 of file api.cc.
References v8::internal::Handle< T >::cast(), ENTER_V8, v8::EscapableHandleScope::Escape(), v8::internal::Object::GetElement(), v8::Utils::OpenHandle(), and v8::Utils::StackFrameToLocal().
Here is the call graph for this function:| int v8::StackTrace::GetFrameCount | ( | ) | const |
Returns the number of StackFrames.
Definition at line 2258 of file api.cc.
References ENTER_V8, and v8::Utils::OpenHandle().
Here is the call graph for this function: