class V8::StackTrace

Public Class Methods

new(native) click to toggle source
# File lib/v8/stack.rb, line 7
def initialize(native)
  @context = V8::Context.current
  @native = native
end

Public Instance Methods

each() { |stack_frame(native.GetFrame(i), context)| ... } click to toggle source
# File lib/v8/stack.rb, line 18
def each
  return unless @native
  @context.enter do
    for i in 0..length - 1
      yield V8::StackFrame.new(@native.GetFrame(i), @context)
    end
  end
end
length() click to toggle source
# File lib/v8/stack.rb, line 12
def length
  @context.enter do
    @native ? @native.GetFrameCount() : 0
  end
end
to_s() click to toggle source
# File lib/v8/stack.rb, line 27
def to_s
  @native ? map(&:to_s).join("\n") : ""
end