Introduce a new type MaybeUnreflectedDom<T> (fixes #25701)

This commit is contained in:
Anthony Ramine 2020-02-17 10:17:47 +01:00
parent 3475790fc2
commit 14846d0567
8 changed files with 120 additions and 80 deletions

View file

@ -58,7 +58,7 @@ fn expand_dom_object(input: syn::DeriveInput) -> proc_macro2::TokenStream {
}
impl #impl_generics crate::dom::bindings::reflector::MutDomObject for #name #ty_generics #where_clause {
fn init_reflector(&mut self, obj: *mut js::jsapi::JSObject) {
unsafe fn init_reflector(&self, obj: *mut js::jsapi::JSObject) {
self.#first_field_name.init_reflector(obj);
}
}