diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2023-06-26 13:54:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 13:54:10 +0200 |
commit | ad3c494b46c97f0cf91098b7ec2afa576ea7a3dd (patch) | |
tree | 2996e36708b4c726c3b5e99b6fbbd8e63fcc121b /runtime/web_worker.rs | |
parent | c7d38e593f7de66af47321e7463d8c15ae4176f2 (diff) |
Revert "Reland "refactor(core): cleanup feature flags for js source i… (#19611)
…nclusion" (#19519)"
This reverts commit 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2.
This change causes failures when used outside Deno repo:
```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 1.34.3+b37b286
Args: ["/opt/hostedtoolcache/deno/0.0.0-b37b286f7fa68d5656f7c180f6127bdc38cf2cf5/x64/deno", "test", "--doc", "--unstable", "--allow-all", "--coverage=./cov"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to read "/home/runner/work/deno/deno/core/00_primordials.js"
Caused by:
No such file or directory (os error 2)', core/runtime/jsruntime.rs:699:8
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r-- | runtime/web_worker.rs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 55b746212..2dde5a369 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -398,14 +398,14 @@ impl WebWorker { // `runtime/build.rs`, `runtime/worker.rs` and `cli/build.rs`! let mut extensions: Vec<Extension> = vec![ // Web APIs - deno_webidl::deno_webidl::init_ext(), - deno_console::deno_console::init_ext(), - deno_url::deno_url::init_ext(), - deno_web::deno_web::init_ext::<PermissionsContainer>( + deno_webidl::deno_webidl::init_ops(), + deno_console::deno_console::init_ops(), + deno_url::deno_url::init_ops(), + deno_web::deno_web::init_ops::<PermissionsContainer>( options.blob_store.clone(), Some(main_module.clone()), ), - deno_fetch::deno_fetch::init_ext::<PermissionsContainer>( + deno_fetch::deno_fetch::init_ops::<PermissionsContainer>( deno_fetch::Options { user_agent: options.bootstrap.user_agent.clone(), root_cert_store_provider: options.root_cert_store_provider.clone(), @@ -416,57 +416,57 @@ impl WebWorker { ..Default::default() }, ), - deno_cache::deno_cache::init_ext::<SqliteBackedCache>(create_cache), - deno_websocket::deno_websocket::init_ext::<PermissionsContainer>( + deno_cache::deno_cache::init_ops::<SqliteBackedCache>(create_cache), + deno_websocket::deno_websocket::init_ops::<PermissionsContainer>( options.bootstrap.user_agent.clone(), options.root_cert_store_provider.clone(), options.unsafely_ignore_certificate_errors.clone(), ), - deno_webstorage::deno_webstorage::init_ext(None).disable(), - deno_crypto::deno_crypto::init_ext(options.seed), - deno_broadcast_channel::deno_broadcast_channel::init_ext( + deno_webstorage::deno_webstorage::init_ops(None).disable(), + deno_crypto::deno_crypto::init_ops(options.seed), + deno_broadcast_channel::deno_broadcast_channel::init_ops( options.broadcast_channel.clone(), unstable, ), - deno_ffi::deno_ffi::init_ext::<PermissionsContainer>(unstable), - deno_net::deno_net::init_ext::<PermissionsContainer>( + deno_ffi::deno_ffi::init_ops::<PermissionsContainer>(unstable), + deno_net::deno_net::init_ops::<PermissionsContainer>( options.root_cert_store_provider.clone(), unstable, options.unsafely_ignore_certificate_errors.clone(), ), - deno_tls::deno_tls::init_ext(), - deno_kv::deno_kv::init_ext( + deno_tls::deno_tls::init_ops(), + deno_kv::deno_kv::init_ops( SqliteDbHandler::<PermissionsContainer>::new(None), unstable, ), - deno_napi::deno_napi::init_ext::<PermissionsContainer>(), - deno_http::deno_http::init_ext::<DefaultHttpPropertyExtractor>(), - deno_io::deno_io::init_ext(Some(options.stdio)), - deno_fs::deno_fs::init_ext::<PermissionsContainer>( + deno_napi::deno_napi::init_ops::<PermissionsContainer>(), + deno_http::deno_http::init_ops::<DefaultHttpPropertyExtractor>(), + deno_io::deno_io::init_ops(Some(options.stdio)), + deno_fs::deno_fs::init_ops::<PermissionsContainer>( unstable, options.fs.clone(), ), - deno_node::deno_node::init_ext::<PermissionsContainer>( + deno_node::deno_node::init_ops::<PermissionsContainer>( options.npm_resolver, options.fs, ), // Runtime ops that are always initialized for WebWorkers - ops::web_worker::deno_web_worker::init_ext(), - ops::runtime::deno_runtime::init_ext(main_module.clone()), - ops::worker_host::deno_worker_host::init_ext( + ops::web_worker::deno_web_worker::init_ops(), + ops::runtime::deno_runtime::init_ops(main_module.clone()), + ops::worker_host::deno_worker_host::init_ops( options.create_web_worker_cb.clone(), options.preload_module_cb.clone(), options.pre_execute_module_cb.clone(), options.format_js_error_fn.clone(), ), - ops::fs_events::deno_fs_events::init_ext(), - ops::os::deno_os_worker::init_ext(), - ops::permissions::deno_permissions::init_ext(), - ops::process::deno_process::init_ext(), - ops::signal::deno_signal::init_ext(), - ops::tty::deno_tty::init_ext(), - ops::http::deno_http_runtime::init_ext(), - deno_permissions_web_worker::init_ext( + ops::fs_events::deno_fs_events::init_ops(), + ops::os::deno_os_worker::init_ops(), + ops::permissions::deno_permissions::init_ops(), + ops::process::deno_process::init_ops(), + ops::signal::deno_signal::init_ops(), + ops::tty::deno_tty::init_ops(), + ops::http::deno_http_runtime::init_ops(), + deno_permissions_web_worker::init_ops( permissions, unstable, enable_testing_features, |