Skip to content

Commit

Permalink
Move RegisterBindings::RegisterProxyHandlers call into script::init
Browse files Browse the repository at this point in the history
closes #7336
  • Loading branch information
jxs committed Aug 24, 2015
1 parent 524b02d commit 77e8d30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions components/script/lib.rs
Expand Up @@ -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() {
Expand All @@ -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();
}
5 changes: 0 additions & 5 deletions components/servo/lib.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 77e8d30

Please sign in to comment.