diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2021-05-22 18:08:24 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2021-05-23 15:16:42 +0200 |
commit | af1546391c4a561eb26ccf9cd244b05aed9b5bfc (patch) | |
tree | 6c3a07150dd2dc4a3ea712c21c74585e6bca0bab /cli/program_state.rs | |
parent | 8cf7f966f24d0fb996b41d92b04ad9647337a8f6 (diff) |
feat(extensions): BroadcastChannel WPT conformance
Replaces the file-backed provider by an in-memory one because proper
file locking is a hard problem that detracts from the proof of concept.
Teach the WPT runner how to extract tests from .html files because all
the relevant tests in test_util/wpt/webmessaging/broadcastchannel are
inside basics.html and interface.html.
Diffstat (limited to 'cli/program_state.rs')
-rw-r--r-- | cli/program_state.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/program_state.rs b/cli/program_state.rs index 50890b9e4..9f7ddc749 100644 --- a/cli/program_state.rs +++ b/cli/program_state.rs @@ -15,6 +15,7 @@ use crate::module_graph::TypeLib; use crate::source_maps::SourceMapGetter; use crate::specifier_handler::FetchHandler; use crate::version; +use deno_runtime::deno_broadcast_channel::InMemoryBroadcastChannel; use deno_runtime::deno_file::BlobUrlStore; use deno_runtime::inspector::InspectorServer; use deno_runtime::permissions::Permissions; @@ -52,6 +53,7 @@ pub struct ProgramState { pub maybe_inspector_server: Option<Arc<InspectorServer>>, pub ca_data: Option<Vec<u8>>, pub blob_url_store: BlobUrlStore, + pub broadcast_channel: InMemoryBroadcastChannel, } impl ProgramState { @@ -77,6 +79,7 @@ impl ProgramState { }; let blob_url_store = BlobUrlStore::default(); + let broadcast_channel = InMemoryBroadcastChannel::default(); let file_fetcher = FileFetcher::new( http_cache, @@ -143,6 +146,7 @@ impl ProgramState { maybe_inspector_server, ca_data, blob_url_store, + broadcast_channel, }; Ok(Arc::new(program_state)) } |