v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
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, kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName, kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL } |
Public Member Functions | |
Local< StackFrame > | GetFrame (uint32_t index) const |
int | GetFrameCount () const |
Local< Array > | AsArray () |
Static Public Member Functions | |
static Local< StackTrace > | CurrentStackTrace (int frame_limit, StackTraceOptions options=kOverview) |
Representation of a JavaScript stack trace. The information collected is a snapshot of the execution stack and the information remains valid after execution continues.
enum StackTraceOptions |
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 | |
kOverview | |
kDetailed |
Returns StackTrace as a v8::Array that contains StackFrame objects.
Definition at line 1990 of file api.cc.
References ENTER_V8, Utils::OpenHandle(), and Utils::ToLocal().
Referenced by AnalyzeStackInNativeCode().
|
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 1998 of file api.cc.
References Isolate::CaptureCurrentStackTrace(), ENTER_V8, and Utils::StackTraceToLocal().
Referenced by AnalyzeStackInNativeCode(), and AnalyzeStackOfEvalWithSourceURL().
Local< StackFrame > GetFrame | ( | uint32_t | index | ) | const |
Returns a StackFrame at a particular index.
Definition at line 1968 of file api.cc.
References JSObject::cast(), HandleScope::Close(), ENTER_V8, Object::GetElementNoExceptionThrown(), Utils::OpenHandle(), and Utils::StackFrameToLocal().
Referenced by AnalyzeStackInNativeCode(), and AnalyzeStackOfEvalWithSourceURL().
int GetFrameCount | ( | ) | const |
Returns the number of StackFrames.
Definition at line 1982 of file api.cc.
References Smi::cast(), ENTER_V8, Utils::OpenHandle(), and Smi::value().
Referenced by AnalyzeStackInNativeCode(), and AnalyzeStackOfEvalWithSourceURL().