Skip to content

Hawaii Rooting

Josh Matthews edited this page Jan 6, 2017 · 1 revision

#AnimationFrame issues

We believe that the problem(s) are:

  • WebIDL callbacks (JS closures) need to be properly rooted. Currently not.

    • Solution: Implement darn rooting API
  • FnBox trait objects are opaque to rooting. Can't be put in JS

    • Solution: Don't do that.
  • In order to do rooting properly we need two types for each rootable thingy. One for stack, one for heap. Code explosion.

    • Solution: Generics? JS<T, Rooted>.

MIR pass! Just check list of all local variables.

#Generics

We can't lint-check their bodies. We don't know if T is rooted or now.

`fn foo<#[must_root] T>()? Function MUST have bound of T: Rootable or #[must_root] T if you wish to pass a rootable T to it.

mem::replace isn't a problem because it gets checked at the call site.

#Action items:

Clone this wiki locally