Return a Temporary from *Binding::Wrap.

Returning a JS<T> is GC-unsafe.

This commit also includes some cleanup around Node and Document reflection.
This commit is contained in:
Ms2ger 2014-07-10 16:40:41 +02:00
parent 360d5d01d8
commit 439bc78cab
5 changed files with 16 additions and 28 deletions

View file

@ -388,7 +388,7 @@ impl Window {
script_chan: ScriptChan,
compositor: Box<ScriptListener>,
image_cache_task: ImageCacheTask)
-> JS<Window> {
-> Temporary<Window> {
let win = box Window {
eventtarget: EventTarget::new_inherited(WindowTypeId),
script_chan: script_chan,