Allow mojo binding primitives to use arbitrary reference types to point to impls |
||
Issue descriptionAll bindings primitives today use a raw pointer to point at their target impl. If this were customizable we could support bindings with weak ptrs and such. This is particularly useful in blink where it's common for an impl to be a GCed object. Today this means all such impls need a pre-finalizer to explicitly close the binding and avoid dispatch. They could instead use a binding which holds a WeakPersistent.
,
Oct 10 2016
,
Oct 10 2016
Does this mean that we no longer need to use a pre-finalizer for Mojo Bindings?
,
Oct 10 2016
Yes, you should be able to implement traits for WeakPersistent and use them. See the unit test in the CL for an example of this with base::WeakPtr. |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Oct 10 2016