diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-01 16:42:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 16:42:05 -0400 |
commit | 913176313b6869eeb29b8d48e0c8d80227fa6544 (patch) | |
tree | cc0128b36ea9b22207a3dd41a401ae4ecd131e74 /runtime/ops/web_worker/sync_fetch.rs | |
parent | ecc70eb58fd5531f3b93402cf781e93ef2bb4d64 (diff) |
perf: lazily create RootCertStore (#18938)
Diffstat (limited to 'runtime/ops/web_worker/sync_fetch.rs')
-rw-r--r-- | runtime/ops/web_worker/sync_fetch.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/ops/web_worker/sync_fetch.rs b/runtime/ops/web_worker/sync_fetch.rs index 2049d5ab8..ba5f325d6 100644 --- a/runtime/ops/web_worker/sync_fetch.rs +++ b/runtime/ops/web_worker/sync_fetch.rs @@ -8,7 +8,6 @@ use deno_core::op; use deno_core::url::Url; use deno_core::OpState; use deno_fetch::data_url::DataUrl; -use deno_fetch::reqwest; use deno_web::BlobStore; use deno_websocket::DomExceptionNetworkError; use hyper::body::Bytes; @@ -41,7 +40,7 @@ pub fn op_worker_sync_fetch( let handle = state.borrow::<WebWorkerInternalHandle>().clone(); assert_eq!(handle.worker_type, WebWorkerType::Classic); - let client = state.borrow::<reqwest::Client>().clone(); + let client = deno_fetch::get_or_create_client_from_state(state)?; // TODO(andreubotella) It's not good to throw an exception related to blob // URLs when none of the script URLs use the blob scheme. |