mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
maintain referential integrity for embedded procs
This commit is contained in:
parent
6157d35d4a
commit
65acfdbe6a
1 changed files with 10 additions and 3 deletions
|
@ -1,9 +1,16 @@
|
|||
class V8::Conversion
|
||||
module Proc
|
||||
|
||||
def to_v8
|
||||
template = V8::C::FunctionTemplate::New()
|
||||
template.SetCallHandler(InvocationHandler.new, V8::C::External::New(self))
|
||||
return template.GetFunction()
|
||||
return v8_template.GetFunction()
|
||||
end
|
||||
|
||||
def v8_template
|
||||
unless @v8_template
|
||||
@v8_template = V8::C::FunctionTemplate::New()
|
||||
@v8_template.SetCallHandler(InvocationHandler.new, V8::C::External::New(self))
|
||||
end
|
||||
return @v8_template
|
||||
end
|
||||
|
||||
class InvocationHandler
|
||||
|
|
Loading…
Reference in a new issue