Simplify signature of Component::run

We don't need to pass the root item anymore since ComponentVTable
has now get_item_ref.
This commit is contained in:
Simon Hausmann 2020-11-11 15:55:03 +01:00
parent 94ed0ae1d1
commit 02904c4014
7 changed files with 17 additions and 16 deletions

View file

@ -329,7 +329,7 @@ declare_types! {
let component = cx.borrow(&mut this, |x| x.0.clone());
let component = component.ok_or(()).or_else(|()| cx.throw_error("Invalid type"))?;
run_scoped(&mut cx,this.downcast().unwrap(), || {
component.window().run(component.borrow(), component.borrow_instance().root_item());
component.window().run(component.borrow());
Ok(())
})?;
Ok(JsUndefined::new().as_value(&mut cx))