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:
parent
88815a2769
commit
da11a11987
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue