refactor: split worker and worker host logic (#3722)

* split ops/worker.rs into ops/worker_host.rs and ops/web_worker.rs

* refactor js/workers.ts and factor out js/worker_main.ts - entry point for WebWorker runtime

* BREAKING CHANGE: remove support for blob: URL in Worker

* BREAKING CHANGE: remove Deno namespace support and noDenoNamespace option in Worker constructor

* introduce WebWorker struct which is a stripped down version of cli::Worker
This commit is contained in:
Bartek Iwańczuk 2020-01-21 09:49:47 +01:00 committed by GitHub
parent c90036ab88
commit 7966bf14c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 439 additions and 263 deletions

View file

@ -231,7 +231,7 @@ impl TsCompiler {
fn setup_worker(global_state: ThreadSafeGlobalState) -> Worker {
let (int, ext) = ThreadSafeState::create_channels();
let worker_state =
ThreadSafeState::new(global_state.clone(), None, None, true, int)
ThreadSafeState::new(global_state.clone(), None, None, int)
.expect("Unable to create worker state");
// Count how many times we start the compiler worker.

View file

@ -45,7 +45,7 @@ impl WasmCompiler {
fn setup_worker(global_state: ThreadSafeGlobalState) -> Worker {
let (int, ext) = ThreadSafeState::create_channels();
let worker_state =
ThreadSafeState::new(global_state.clone(), None, None, true, int)
ThreadSafeState::new(global_state.clone(), None, None, int)
.expect("Unable to create worker state");
// Count how many times we start the compiler worker.