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
|
class V8::Conversion
|
||||||
module Proc
|
module Proc
|
||||||
|
|
||||||
def to_v8
|
def to_v8
|
||||||
template = V8::C::FunctionTemplate::New()
|
return v8_template.GetFunction()
|
||||||
template.SetCallHandler(InvocationHandler.new, V8::C::External::New(self))
|
end
|
||||||
return template.GetFunction()
|
|
||||||
|
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
|
end
|
||||||
|
|
||||||
class InvocationHandler
|
class InvocationHandler
|
||||||
|
|
Loading…
Reference in a new issue