From 77e8d3071c4350b7dd69dfe97794a5c04e9861f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Oliveira?= Date: Mon, 24 Aug 2015 18:38:04 +0100 Subject: [PATCH] Move RegisterBindings::RegisterProxyHandlers call into script::init closes #7336 --- components/script/lib.rs | 6 ++++++ components/servo/lib.rs | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/script/lib.rs b/components/script/lib.rs index 5bae563301a..3c68c18d27a 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -98,6 +98,8 @@ mod devtools; mod horribly_inefficient_timers; mod webdriver_handlers; +use dom::bindings::codegen::RegisterBindings; + #[cfg(target_os="linux")] #[allow(unsafe_code)] fn perform_platform_specific_initialization() { @@ -123,5 +125,9 @@ pub fn init() { assert_eq!(js::jsapi::JS_Init(), 1); } + // Create the global vtables used by the (generated) DOM + // bindings to implement JS proxies. + RegisterBindings::RegisterProxyHandlers(); + perform_platform_specific_initialization(); } diff --git a/components/servo/lib.rs b/components/servo/lib.rs index e588f49b95a..dbf127803d3 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -42,8 +42,6 @@ use compositing::{CompositorProxy, CompositorTask, Constellation}; use msg::constellation_msg::ConstellationChan; use msg::constellation_msg::Msg as ConstellationMsg; -use script::dom::bindings::codegen::RegisterBindings; - use net::image_cache_task::new_image_cache_task; use net::resource_task::new_resource_task; use net::storage_task::StorageTaskFactory; @@ -82,9 +80,6 @@ impl Browser { let opts = opts::get(); script::init(); - // Create the global vtables used by the (generated) DOM - // bindings to implement JS proxies. - RegisterBindings::RegisterProxyHandlers(); // Get both endpoints of a special channel for communication between // the client window and the compositor. This channel is unique because