mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
Use class constructor to generate object proxies
This commit is contained in:
parent
d020ba13b3
commit
e7db9d8d38
1 changed files with 3 additions and 2 deletions
|
@ -3,8 +3,9 @@ class V8::Conversion
|
|||
include V8::Util::Weakcell
|
||||
|
||||
def to_v8
|
||||
object = to_v8_template.NewInstance()
|
||||
V8::Context.link self, object
|
||||
context = V8::Context.current
|
||||
constructor = context.to_v8(self.class)
|
||||
object = constructor.NewInstance([V8::C::External::New(self)])
|
||||
return object
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue