mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
referential integrity between class constructors
This commit is contained in:
parent
7bc06b27c0
commit
bde7661189
1 changed files with 8 additions and 2 deletions
|
@ -3,9 +3,15 @@ class V8::Conversion
|
|||
include V8::Util::Weakcell
|
||||
|
||||
def to_v8
|
||||
fn = to_v8_template.GetFunction()
|
||||
V8::Context.current.link self, fn
|
||||
return fn
|
||||
end
|
||||
|
||||
def to_v8_template
|
||||
weakcell(:v8_constructor) do
|
||||
V8::C::FunctionTemplate::New(Constructor.new(self))
|
||||
end.GetFunction()
|
||||
template = V8::C::FunctionTemplate::New(Constructor.new(self))
|
||||
end
|
||||
end
|
||||
|
||||
class Constructor
|
||||
|
|
Loading…
Add table
Reference in a new issue