diff options
author | Aron Zwaan <aronzwaan@gmail.com> | 2019-03-30 21:03:20 +0100 |
---|---|---|
committer | Aron Zwaan <aronzwaan@gmail.com> | 2019-04-03 20:45:30 +0200 |
commit | 782b58587acc754c7b378a84a4b51405738bb081 (patch) | |
tree | a530be8317cbda75e8d81679a7abc9fbd6379541 /components/script/dom/serviceworkercontainer.rs | |
parent | 6fa1853bb1e9bc80271c5259a8d2ed7799a0d6ff (diff) | |
download | servo-782b58587acc754c7b378a84a4b51405738bb081.tar.gz servo-782b58587acc754c7b378a84a4b51405738bb081.zip |
Rename Promise::new to Promise::new_in_current_compartment
Diffstat (limited to 'components/script/dom/serviceworkercontainer.rs')
-rw-r--r-- | components/script/dom/serviceworkercontainer.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs index 9ddd5a37922..74458548efe 100644 --- a/components/script/dom/serviceworkercontainer.rs +++ b/components/script/dom/serviceworkercontainer.rs @@ -54,9 +54,10 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer { #[allow(unrooted_must_root)] // Job is unrooted /// https://w3c.github.io/ServiceWorker/#service-worker-container-register-method and - A /// https://w3c.github.io/ServiceWorker/#start-register-algorithm - B + #[allow(unsafe_code)] fn Register(&self, script_url: USVString, options: &RegistrationOptions) -> Rc<Promise> { // A: Step 1 - let promise = Promise::new(&*self.global()); + let promise = unsafe { Promise::new_in_current_compartment(&*self.global()) }; let USVString(ref script_url) = script_url; let api_base_url = self.global().api_base_url(); // A: Step 3-5 |