Make the global object be the Window object. Fixes #833.

This commit is contained in:
Josh Matthews 2013-09-06 11:34:02 -04:00
parent 2d3a4d7e1d
commit da599c6ccf
12 changed files with 95 additions and 69 deletions

View file

@ -21,7 +21,6 @@ use std::cast::transmute;
use std::libc::c_void;
use extra::arc::Arc;
use js::jsapi::{JSObject, JSContext};
use js::rust::Compartment;
use netsurfcss::util::VoidPtrLike;
use newcss::complete::CompleteSelectResults;
use servo_util::tree::{TreeNode, TreeNodeRef};
@ -628,11 +627,6 @@ impl VoidPtrLike for AbstractNode<LayoutView> {
}
}
pub fn define_bindings(compartment: @mut Compartment) {
bindings::utils::initialize_global(compartment.global_obj.ptr);
bindings::codegen::RegisterBindings::Register(compartment);
}
impl CacheableWrapper for Node<ScriptView> {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
unsafe { cast::transmute(&mut self.wrapper) }