summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/workers
AgeCommit message (Collapse)Author
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-09-28feat(unstable): Deno.setRaw -> Deno.stdin.setRaw (#15797)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-19refactor: move out test files from root testdata directory into sub ↵David Sherret
directories (#15949)
2022-07-20chore: use import.meta.resolve() in tests (#15256)Bartek Iwańczuk
2022-06-14feat(test): update test summary report (#14629)Mark Ladyshau
2022-05-17BREAKING(unstable): Enable Deno namespace in workers by default (#14581)Nayeem Rahman
This commit removes "WorkerOptions.deno" option as a boolean, as well as "WorkerOptions.deno.namespace" settings. Starting with this commit all workers have access to "Deno" namespace by default.
2022-05-17BREAKING: Remove unstable Deno.emit and Deno.formatDiagnostics APIs (#14463)Bartek Iwańczuk
2022-05-05test: Manually truncate path string (#14407)Nayeem Rahman
2022-04-27refactor: Remove PrettyJsError and js_error_create_fn (#14378)Nayeem Rahman
This commit: - removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn - removes "deno_core::JsError::create" and "deno_core::RuntimeOptions::js_error_create_fn" - adds new option to "deno_runtime::ops::worker_host::init"
2022-04-13feat(ext/web): Add error events for event listener and timer errors (#14159)Nayeem Rahman
- feat: Add handleable error event for even listener errors - feat: Add handleable error event for setTimeout()/setInterval() errors - feat: Add Deno.core.destructureError() - feat: Add Deno.core.terminate() - fix: Don't throw listener errors from dispatchEvent() - fix: Use biased mode when selecting between mod_evaluate() and run_event_loop() results
2022-04-08refactor(core): OpCtx (#14228)Aaron O'Mullan
2022-03-20fix: actually don't inherit runtime permissions (#14024)Luca Casonato
2022-03-18chore(ops): include argument position in serde_v8 errors (#14027)Divy Srivastava
2022-01-20chore: update copyright year (#13434)Yoshiya Hinosawa
2022-01-09fix: expose "Deno.memoryUsage()" in worker context (#13293)Rodney van den Velden
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-22chore: update deno_graph and deno_doc (#13173)Kitson Kelly
2021-11-29fix(workers): Make `worker.terminate()` not immediately kill the isolate ↵Andreu Botella
(#12831) Due to a bug in V8, terminating an isolate while a module with top-level await is being evaluated would crash the process. This change makes it so calling `worker.terminate()` will signal the worker to terminate at the next iteration of the event loop, and it schedules a proper termination of the worker's isolate after 2 seconds.
2021-11-16fix(cli): short-circuit in prepare_module_load() (#12604)Nayeem Rahman
2021-10-30feat(test): better formatting for test elapsed time (#12610)Bartek Iwańczuk
This commit changes formatting of elapsed time in test runner output. Instead of "XXXms", reporter outputs one of: - "XXXms" for <1000ms - "XXs" for <60s - "XXXmYYs" for >=60s
2021-10-14fix(cli/tests): move worker test assertions out of message handlers (#12439)Nayeem Rahman
2021-10-13fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297)Nayeem Rahman
2021-10-11refactor: integrate deno_graph into CLI (#12369)Kitson Kelly
2021-10-07tests: make worker test deterministic (#12361)Nayeem Rahman
2021-10-01fix(runtime/js/workers): throw errors instead of using an op (#12249)Nayeem Rahman
2021-09-30fix: worker environment permissions should accept an array (#12250)David Sherret
2021-09-30fix: Don't panic when a worker is closed in the reactions to a wasm ↵Andreu Botella
operation. (#12270)
2021-09-24chore(workers): Test that closing a worker closes any child workers (#12215)Andreu Botella
Before #12156, closing a worker which had children would cause a panic (https://github.com/denoland/deno/issues/11342#issuecomment-918327693). After that PR, closing a worker will also close any child workers.
2021-09-22fix(workers): Don't panic when a worker's parent thread stops running (#12156)Andreu Botella
This panic could happen in the following cases: - A non-fatal error being thrown from a worker, that doesn't terminate the worker's execution, but propagates to the main thread without being handled, and makes the main thread terminate. - A nested worker being alive while its parent worker gets terminated. - A race condition if the main event loop terminates the worker as part of its last task, but the worker doesn't fully terminate before the main event loop stops running. This panic happens because a worker's event loop should have pending ops as long as the worker isn't closed or terminated – but if an event loop finishes running while it has living workers, its associated `WorkerThread` structs will be dropped, closing the channels that keep those ops pending. This change adds a `Drop` implementation to `WorkerThread`, which terminates the worker without waiting for a response. This fixes the panic, and makes it so nested workers are automatically terminated once any of their ancestors is closed or terminated. This change also refactors a worker's termination code into a `WorkerThread::terminate()` method. Closes #11342. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-09-06Don't drop messages from workers that have already been closed (#11913)Andreu Botella
When `worker.terminate()` is called, the spec requires that the corresponding port message queue is emptied, so no messages can be received after the call, even if they were sent from the worker before it was terminated. The spec doesn't require this of `self.close()`, and since Deno uses different channels to send messages and to notify that the worker was closed, messages might still arrive after the worker is known to be closed, which are currently being dropped. This change fixes that. The fix involves two parts: one on the JS side and one on the Rust side. The JS side was using the `#terminated` flag to keep track of whether the worker is known to be closed, without distinguishing whether further messages should be dropped or not. This PR changes that flag to an enum `#state`, which can be one of `"RUNNING"`, `"CLOSED"` or `"TERMINATED"`. The Rust side was removing the `WorkerThread` struct from the workers table when a close control was received, regardless of whether there were any messages left to read, which made any subsequent calls to `op_host_recv_message` to return `Ok(None)`, as if there were no more mesasges. This change instead waits for both a close control and for the message channel's sender to be closed before the worker thread is removed from the table.
2021-08-31feat(workers): Make the `Deno` namespace configurable and unfrozen (#11888)Andreu Botella
This is the worker counterpart of PR #11062.
2021-08-11chore: move test files to testdata directory (#11601)David Sherret