summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
diff options
context:
space:
mode:
authorrandomicon00 <20146907+randomicon00@users.noreply.github.com>2022-05-14 11:00:02 +0100
committerGitHub <noreply@github.com>2022-05-14 12:00:02 +0200
commitf82a79ffdbc6b8f2fc4bbe6174ad33cb22e64386 (patch)
treeb8a6021de1157fe0cb70036a9eef79a4a2d0cac1 /runtime/worker.rs
parent20ee3110d84c72f4a28cc5c9083b5dda47181602 (diff)
feat: add userAgent property to Navigator's prototype (#14415)
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r--runtime/worker.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 7165b04f0..4c38d232f 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -52,7 +52,6 @@ pub struct WorkerOptions {
pub extensions: Vec<Extension>,
pub unsafely_ignore_certificate_errors: Option<Vec<String>>,
pub root_cert_store: Option<RootCertStore>,
- pub user_agent: String,
pub seed: Option<u64>,
pub module_loader: Rc<dyn ModuleLoader>,
// Callbacks invoked when creating new instance of WebWorker
@@ -111,7 +110,7 @@ impl MainWorker {
options.bootstrap.location.clone(),
),
deno_fetch::init::<Permissions>(deno_fetch::Options {
- user_agent: options.user_agent.clone(),
+ user_agent: options.bootstrap.user_agent.clone(),
root_cert_store: options.root_cert_store.clone(),
unsafely_ignore_certificate_errors: options
.unsafely_ignore_certificate_errors
@@ -120,7 +119,7 @@ impl MainWorker {
..Default::default()
}),
deno_websocket::init::<Permissions>(
- options.user_agent.clone(),
+ options.bootstrap.user_agent.clone(),
options.root_cert_store.clone(),
options.unsafely_ignore_certificate_errors.clone(),
),
@@ -376,9 +375,9 @@ mod tests {
runtime_version: "x".to_string(),
ts_version: "x".to_string(),
unstable: false,
+ user_agent: "x".to_string(),
},
extensions: vec![],
- user_agent: "x".to_string(),
unsafely_ignore_certificate_errors: None,
root_cert_store: None,
seed: None,