class V8::Portal::Proxies::ClearRubyProxy

collected (provided there are no other references to it)
so that the native JavaScript object can itself be garbage
It is important to do this as soon as is reasonably possible
native JavaScript object.
garbage collected, it releases the back reference to the
as a finalizer on the Ruby proxy itself, so that when it is
JavaScript object. In general, this object is registered
Remove the linkage between a Ruby proxy and a native
@Private

def call(proxy_id)

@param[Fixnum] proxy_id the proxy id of the garbage collected Ruby proxy
it was bound to.
and releases the reference to the native JavaScript object that
takes the object id of a Ruby proxy that has been garbage collected
def call(proxy_id)
  # TODO: this if-check should be synchronized, so that if called manually
  # it will not conflict with the finalization thread. It's not so heinous
  # if the refererence gets cleared twice, but we definiteily dont't want
  # to double-decrement the v8 GC hint.
  if js = @rb2js[proxy_id]
    @rb2js.delete(proxy_id)
    @js2rb.delete(js)
  end
end

def initialize(rb2js, js2rb)

def initialize(rb2js, js2rb)
  @rb2js, @js2rb = rb2js, js2rb
end