Move the call to RegisterBindings::Register into WindowBinding::Wrap.

This commit is contained in:
Ms2ger 2014-07-12 16:20:43 +02:00
parent 5baff0cc2c
commit ac5a2767bf
2 changed files with 4 additions and 6 deletions

View file

@ -1821,8 +1821,11 @@ Temporary::new(raw)""" % CreateBindingJSObject(self.descriptor, "scope"))
with_compartment(aCx, obj, || {
let proto = GetProtoObject(aCx, obj, obj);
JS_SetPrototype(aCx, obj, proto);
raw.reflector().set_jsobject(obj);
RegisterBindings::Register(aCx, obj);
});
raw.reflector().set_jsobject(obj);
Temporary::new(raw)""" % CreateBindingJSObject(self.descriptor))