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/standalone.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/standalone.rs')
-rw-r--r-- | cli/standalone.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/standalone.rs b/cli/standalone.rs index e0b131eb8..f281c5336 100644 --- a/cli/standalone.rs +++ b/cli/standalone.rs @@ -15,6 +15,7 @@ use deno_core::v8_set_flags; use deno_core::ModuleLoader; use deno_core::ModuleSpecifier; use deno_core::OpState; +use deno_runtime::deno_broadcast_channel::InMemoryBroadcastChannel; use deno_runtime::deno_file::BlobUrlStore; use deno_runtime::permissions::Permissions; use deno_runtime::permissions::PermissionsOptions; @@ -160,6 +161,7 @@ pub async fn run( let main_module = resolve_url(SPECIFIER)?; let permissions = Permissions::from_options(&metadata.permissions); let blob_url_store = BlobUrlStore::default(); + let broadcast_channel = InMemoryBroadcastChannel::default(); let module_loader = Rc::new(EmbeddedModuleLoader(source_code)); let create_web_worker_cb = Arc::new(|_| { todo!("Worker are currently not supported in standalone binaries"); @@ -193,6 +195,7 @@ pub async fn run( location: metadata.location, location_data_dir: None, blob_url_store, + broadcast_channel, }; let mut worker = MainWorker::from_options(main_module.clone(), permissions, &options); |