mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
bind global scope object to potential ruby implementation *after* creating the context, that way, context.scope is *always* a V8::Object
This commit is contained in:
parent
4a4bd1beeb
commit
bec7b7a13d
1 changed files with 1 additions and 1 deletions
|
@ -6,8 +6,8 @@ module V8
|
|||
def initialize(opts = {})
|
||||
@native = opts[:with] ? C::Context::New(Access.rubyobject) : C::Context::New()
|
||||
@native.enter do
|
||||
@native.Global().SetHiddenValue(C::String::New("TheRubyRacer::RubyObject"), C::External::New(opts[:with])) if opts[:with]
|
||||
@scope = To.rb(@native.Global())
|
||||
@native.Global().SetHiddenValue(C::String::New("TheRubyRacer::RubyObject"), C::External::New(opts[:with])) if opts[:with]
|
||||
end
|
||||
yield(self) if block_given?
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue