aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/worklet.rs
diff options
context:
space:
mode:
authorFausto Núñez Alberro <fausto.nunez@outlook.com>2017-04-26 01:07:31 +0200
committerFausto Núñez Alberro <fausto.nunez@mailbox.org>2017-07-16 21:44:33 +0200
commit6032940fb8723d36c6f5089593d0a57f6a7efc93 (patch)
treec35b06e617fe52d76b07fd99c06765c688e82637 /components/script/dom/worklet.rs
parent104e0b473073340689b4bca5c128c61632d4e58d (diff)
downloadservo-6032940fb8723d36c6f5089593d0a57f6a7efc93.tar.gz
servo-6032940fb8723d36c6f5089593d0a57f6a7efc93.zip
Change RequestInit origin type to ImmutableOrigin
Diffstat (limited to 'components/script/dom/worklet.rs')
-rw-r--r--components/script/dom/worklet.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs
index bbcc777ab11..9a58ef00ca1 100644
--- a/components/script/dom/worklet.rs
+++ b/components/script/dom/worklet.rs
@@ -588,17 +588,14 @@ impl WorkletThread {
// TODO: Fetch a module graph, not just a single script.
// TODO: Fetch the script asynchronously?
// TODO: Caching.
- // TODO: Avoid re-parsing the origin as a URL.
let resource_fetcher = self.global_init.resource_threads.sender();
- let origin_url = ServoUrl::parse(&*origin.unicode_serialization())
- .unwrap_or_else(|_| ServoUrl::parse("about:blank").unwrap());
let request = RequestInit {
url: script_url,
type_: RequestType::Script,
destination: Destination::Script,
mode: RequestMode::CorsMode,
- origin: origin_url,
credentials_mode: credentials.into(),
+ origin,
.. RequestInit::default()
};
let script = load_whole_resource(request, &resource_fetcher).ok()