diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-04-07 15:22:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 15:22:14 +0200 |
commit | 966ce7de8a23f63d0f30b1748fe69ccaf07519e0 (patch) | |
tree | 3275ca96a835fe91a62a73d5a4c83bf6ca917b66 /cli/main.rs | |
parent | 2865f39bec6da135a2d2d679a65e7ff139131bd7 (diff) |
feat: blob URL support (#10045)
This commit adds blob URL support. Blob URLs are stored in a process
global storage, that can be accessed from all workers, and the module
loader. Blob URLs can be created using `URL.createObjectURL` and revoked
using `URL.revokeObjectURL`.
This commit does not add support for `fetch`ing blob URLs. This will be
added in a follow up commit.
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs index e9e29c9db..7146d8548 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -122,6 +122,7 @@ fn create_web_worker_callback( ts_version: version::TYPESCRIPT.to_string(), no_color: !colors::use_color(), get_error_class_fn: Some(&crate::errors::get_error_class_name), + blob_url_store: program_state.blob_url_store.clone(), }; let mut worker = WebWorker::from_options( @@ -199,6 +200,7 @@ pub fn create_main_worker( no_color: !colors::use_color(), get_error_class_fn: Some(&crate::errors::get_error_class_name), location: program_state.flags.location.clone(), + blob_url_store: program_state.blob_url_store.clone(), }; let mut worker = MainWorker::from_options(main_module, permissions, &options); |