aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/lib.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-12 02:27:51 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-12 02:27:51 +0100
commita7cee44f59237c877cd8132cf8634b25d7ea6c9b (patch)
treeafaa7adc471fcd9d94bc648738a2474475009738 /components/script/lib.rs
parentd49840eeec30967cc6f482bc2db9055ab6404ea4 (diff)
downloadservo-a7cee44f59237c877cd8132cf8634b25d7ea6c9b.tar.gz
servo-a7cee44f59237c877cd8132cf8634b25d7ea6c9b.zip
script: Ensure script is initialized before running script.
Fixes #14154
Diffstat (limited to 'components/script/lib.rs')
-rw-r--r--components/script/lib.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/script/lib.rs b/components/script/lib.rs
index 94e9683ffaf..91ccc817cf8 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -163,15 +163,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();