v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StackTrace Class Reference

#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< StackFrameGetFrame (uint32_t index) const
 
int GetFrameCount () const
 
Local< ArrayAsArray ()
 

Static Public Member Functions

static Local< StackTraceCurrentStackTrace (int frame_limit, StackTraceOptions options=kOverview)
 

Detailed Description

Representation of a JavaScript stack trace. The information collected is a snapshot of the execution stack and the information remains valid after execution continues.

Definition at line 763 of file v8.h.

Member Enumeration Documentation

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 

Definition at line 769 of file v8.h.

Member Function Documentation

Local< Array > AsArray ( )

Returns StackTrace as a v8::Array that contains StackFrame objects.

Definition at line 1998 of file api.cc.

References ENTER_V8, and Utils::ToLocal().

Referenced by AnalyzeStackInNativeCode().

Local< StackTrace > CurrentStackTrace ( int  frame_limit,
StackTraceOptions  options = kOverview 
)
static

Grab a snapshot of the current JavaScript execution stack.

Parameters
frame_limitThe maximum number of stack frames we want to capture.
optionsEnumerates the set of things we will capture for each StackFrame.

Definition at line 2006 of file api.cc.

References Isolate::CaptureCurrentStackTrace(), ENTER_V8, and Utils::StackTraceToLocal().

Referenced by AnalyzeStackInNativeCode(), AnalyzeStackOfDynamicScriptWithSourceURL(), AnalyzeStackOfEvalWithSourceURL(), and AnalyzeStackOfInlineScriptWithSourceURL().

int GetFrameCount ( ) const

The documentation for this class was generated from the following files: