mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Move the call to RegisterBindings::Register into WindowBinding::Wrap.
This commit is contained in:
parent
5baff0cc2c
commit
ac5a2767bf
2 changed files with 4 additions and 6 deletions
|
@ -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))
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
//! The script task is the task that owns the DOM in memory, runs JavaScript, and spawns parsing
|
||||
//! and layout tasks.
|
||||
|
||||
use dom::bindings::codegen::RegisterBindings;
|
||||
use dom::bindings::codegen::InheritTypes::{EventTargetCast, NodeCast, EventCast};
|
||||
use dom::bindings::js::{JS, JSRef, RootCollection, Temporary, OptionalSettable};
|
||||
use dom::bindings::js::OptionalRootable;
|
||||
|
@ -548,10 +547,6 @@ impl ScriptTask {
|
|||
let document = Document::new(&*window, Some(url.clone()), HTMLDocument, None).root();
|
||||
window.deref().init_browser_context(&*document);
|
||||
|
||||
with_compartment((**cx).ptr, window.reflector().get_jsobject(), || {
|
||||
RegisterBindings::Register(window.get_cx(), window.reflector().get_jsobject());
|
||||
});
|
||||
|
||||
self.compositor.set_ready_state(Loading);
|
||||
// Parse HTML.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue