1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

hold a reference to the Ruby object

When we have a JS object that proxies a Ruby
object, store a hard reference to the Ruby object
so that it cannot be garbage collected as long as
a reference is being held from within JavaScript.
This commit is contained in:
Charles Lowell 2012-06-20 13:06:02 -05:00
parent 88815a2769
commit da11a11987

View file

@ -40,7 +40,9 @@ class V8::Conversion
end
def link
context.link self[0].Value(), This()
external = self[0]
This().SetHiddenValue("rr::implementation", external)
context.link external.Value(), This()
end
def construct(cls)