Class: V8::StackFrame

Inherits:
Object show all
Defined in:
lib/v8/stack.rb

Instance Method Summary collapse

Constructor Details

#initialize(portal, native) ⇒ StackFrame

Returns a new instance of StackFrame.



29
30
31
32
# File 'lib/v8/stack.rb', line 29

def initialize(portal, native)
  @to = portal
  @native = native
end

Instance Method Details

#columnObject



46
47
48
# File 'lib/v8/stack.rb', line 46

def column
  @native.GetColumn()
end

#constructor?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/v8/stack.rb', line 54

def constructor?
  @native.IsConstructor()
end

#eval?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/v8/stack.rb', line 50

def eval?
  @native.IsEval()
end

#function_nameObject



38
39
40
# File 'lib/v8/stack.rb', line 38

def function_name
  @to.rb(@native.GetFunctionName())
end

#line_numberObject



42
43
44
# File 'lib/v8/stack.rb', line 42

def line_number
  @native.GetLineNumber()
end

#script_nameObject



34
35
36
# File 'lib/v8/stack.rb', line 34

def script_name
  @to.rb(@native.GetScriptName())
end

#to_sObject



58
59
60
61
62
63
64
# File 'lib/v8/stack.rb', line 58

def to_s
  if @native.GetFunctionName()
    "#{function_name} (#{script_name}:#{line_number}:#{column})"
  else
    "#{script_name}:#{line_number}:#{column}"
  end
end