aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/lib.rs')
-rw-r--r--components/script/lib.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/components/script/lib.rs b/components/script/lib.rs
index 94e9683ffaf..ed3283868d5 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -48,6 +48,7 @@ extern crate heapsize;
#[macro_use] extern crate heapsize_derive;
extern crate html5ever;
#[macro_use] extern crate html5ever_atoms;
+#[macro_use]
extern crate hyper;
extern crate hyper_serde;
extern crate image;
@@ -163,15 +164,17 @@ fn perform_platform_specific_initialization() {
#[cfg(not(target_os = "linux"))]
fn perform_platform_specific_initialization() {}
+pub fn init_service_workers(sw_senders: SWManagerSenders) {
+ // Spawn the service worker manager passing the constellation sender
+ ServiceWorkerManager::spawn_manager(sw_senders);
+}
+
#[allow(unsafe_code)]
-pub fn init(sw_senders: SWManagerSenders) {
+pub fn init() {
unsafe {
proxyhandler::init();
}
- // Spawn the service worker manager passing the constellation sender
- ServiceWorkerManager::spawn_manager(sw_senders);
-
// Create the global vtables used by the (generated) DOM
// bindings to implement JS proxies.
RegisterBindings::RegisterProxyHandlers();