diff options
Diffstat (limited to 'components/plugins/reflector.rs')
-rw-r--r-- | components/plugins/reflector.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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))) |