aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'components/plugins')
-rw-r--r--components/plugins/lints/unrooted_must_root.rs5
-rw-r--r--components/plugins/reflector.rs6
2 files changed, 8 insertions, 3 deletions
diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs
index 7c1d8161f67..f9e9c7b6db1 100644
--- a/components/plugins/lints/unrooted_must_root.rs
+++ b/components/plugins/lints/unrooted_must_root.rs
@@ -34,8 +34,7 @@ pub struct UnrootedPass;
// TODO (#3874, sort of): unwrap other types like Vec/Option/HashMap/etc
fn lint_unrooted_ty(cx: &Context, ty: &ast::Ty, warning: &str) {
match ty.node {
- ast::TyVec(ref t) | ast::TyFixedLengthVec(ref t, _) |
- ast::TyPtr(ast::MutTy { ty: ref t, ..}) | ast::TyRptr(_, ast::MutTy { ty: ref t, ..}) =>
+ ast::TyVec(ref t) | ast::TyFixedLengthVec(ref t, _) =>
lint_unrooted_ty(cx, &**t, warning),
ast::TyPath(..) => {
match cx.tcx.def_map.borrow()[&ty.id] {
@@ -47,7 +46,7 @@ fn lint_unrooted_ty(cx: &Context, ty: &ast::Ty, warning: &str) {
_ => (),
}
}
- _ => (),
+ _ => (),
};
}
diff --git a/components/plugins/reflector.rs b/components/plugins/reflector.rs
index 68a6011e7d4..6bb43552a3e 100644
--- a/components/plugins/reflector.rs
+++ b/components/plugins/reflector.rs
@@ -25,6 +25,9 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
fn reflector<'a>(&'a self) -> &'a ::dom::bindings::utils::Reflector {
&self.$field_name
}
+ fn init_reflector(&mut self, obj: *mut ::js::jsapi::JSObject) {
+ self.$field_name.set_jsobject(obj);
+ }
}
);
impl_item.map(|it| push(Annotatable::Item(it)))
@@ -37,6 +40,9 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
fn reflector<'a>(&'a self) -> &'a ::dom::bindings::utils::Reflector {
self.$field_name.reflector()
}
+ fn init_reflector(&mut self, obj: *mut ::js::jsapi::JSObject) {
+ self.$field_name.init_reflector(obj);
+ }
}
);
impl_item.map(|it| push(Annotatable::Item(it)))