# File lib/v8/stack.rb, line 7 def initialize(native) @context = V8::Context.current @native = native end
# 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
# File lib/v8/stack.rb, line 12 def length @context.enter do @native ? @native.GetFrameCount() : 0 end end
# File lib/v8/stack.rb, line 27 def to_s @native ? map(&:to_s).join("\n") : "" end