Pass a JSContext and a reflector to RegisterBindings::Register.

This makes the generated code less dependent on the fact that all global
objects are Windows.
This commit is contained in:
Ms2ger 2014-07-12 16:05:25 +02:00
parent 2191a578c6
commit 5baff0cc2c
2 changed files with 8 additions and 8 deletions

View file

@ -549,7 +549,7 @@ impl ScriptTask {
window.deref().init_browser_context(&*document);
with_compartment((**cx).ptr, window.reflector().get_jsobject(), || {
RegisterBindings::Register(&*window);
RegisterBindings::Register(window.get_cx(), window.reflector().get_jsobject());
});
self.compositor.set_ready_state(Loading);