summaryrefslogtreecommitdiff
path: root/runtime/worker.rs
AgeCommit message (Collapse)Author
2022-05-14feat: add userAgent property to Navigator's prototype (#14415)randomicon00
2022-05-10fix(runtime/web_worker): Use biased select when getting module result (#14553)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-26fix(test): capture worker stdout and stderr in test output (#14410)David Sherret
2022-04-21feat(runtime): two-tier subprocess API (#11618)Leo Kettmeir
2022-04-15refactor: Move source map lookups to core (#14274)Nayeem Rahman
The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place.
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-03-22feat(core): disableable extensions & ops (#14063)Aaron O'Mullan
Streamlines a common middleware pattern and provides foundations for avoiding variably sized v8::ExternalReferences & enabling fully monomorphic op callpaths
2022-03-01fix(runtime): disable console color for non tty stdout (#13782)Antonio Musolino
2022-02-15chore(ext/timers): move ext/timers to ext/web (#13665)Andreu Botella
2022-02-11compat: support --compat in web workers (#13629)Bartek Iwańczuk
Adds another callback to WebWorkerOptions that allows to execute some modules before actual worker code executes. This allows to set up Node global using std/node.
2022-01-18fix(runtime): don't crash when window is deleted (#13392)Bartek Iwańczuk
This commit fixes an error when user deletes "window" global JS variable. Instead of relying on "window" or "globalThis" to dispatch "load" and "unload" events, we are default to global scope of the worker.
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-21refactor: cleanup cli/main.rs (#13160)Bartek Iwańczuk
2021-12-17fix: inspector prompts (#13123)Bartek Iwańczuk
This commit fixes prompts printed to the terminal when running with "--inspect" or "--inspect-brk" flags. When debugger disconnects error is no longer printed as users don't care about the reason debugger did disconnect. A message suggesting to go to "chrome://inspect" is printed if debugger is active. Additionally and information that process is waiting for debugger to connect is printed if running with "--inspect-brk" flag.
2021-12-16fix(test): wait for inspector session in side modules (#13065)Jesper van den Ende
This commit fixes inspector integration with "deno test" subcommand by waiting for inspector sessions to connect if "--inspect-brk" flag is passed. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-12-11fix: op_set_exit_code (#13034)Bartek Iwańczuk
Fixes "op_set_exit_code" by sharing a single "Arc" between all workers (via "op state") instead of having a "global" value stored in "deno_runtime" crate. As a consequence setting an exit code is always scoped to a tree of workers, instead of being overridable if there are multiple worker tree (like in "deno test --jobs" subcommand). Refactored "cli/main.rs" functions to return "Result<i32, AnyError>" instead of "Result<(), AnyError>" so they can return exit code.
2021-12-03refactor(ext/fetch): pass opstate in `FetchHandler::fetch_file`Leo Kettmeir
2021-11-28refactor: add deno_fetch::Options for init (#12904)Ryan Dahl
deno_fetch::init has a lot of parameters and generic on two types that keeps expanding over time. This refactor adds deno_fetch::Options struct for more clearly defining the various parameters.
2021-11-01feat(ext/fetch): support fetching local files (#12545)Kitson Kelly
Closes #11925 Closes #2150 Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-10-10refactor(metrics): move to core (#12386)Aaron O'Mullan
Avoids overhead of wrapping ops (and allocs when inspecting async-op futures)
2021-10-08feat(runtime): allow passing extensions via Worker options (#12362)Aaron O'Mullan
2021-10-05refactor(runtime): Worker bootstrap options (#12299)Aaron O'Mullan
2021-09-29feat: support serializing `WebAssembly.Module` objects (#12140)Andreu Botella
2021-09-24chore(runtime): minor comment improvement (#12191)Aaron O'Mullan
2021-09-23refactor: Remove depreated Worker::execute_module (#12203)Ryan Dahl
2021-09-18fix(core): prevent multiple main module loading (#12128)Bartek Iwańczuk
This commit fixes a problem where loading and executing multiple modules leads to all of the having "import.meta.main" set to true. Following Rust APIs were deprecated: - deno_core::JsRuntime::load_module - deno_runtime::Worker::execute_module - deno_runtime::WebWorker::execute_module Following Rust APIs were added: - deno_core::JsRuntime::load_main_module - deno_core::JsRuntime::load_side_module - deno_runtime::Worker::execute_main_module - deno_runtime::Worker::execute_side_module - deno_runtime::WebWorker::execute_main_module Trying to load multiple "main" modules into the runtime now results in an error. If user needs to load additional "non-main" modules they should use APIs for "side" module.
2021-08-25feat(fetch): mTLS client certificates for fetch() (#11721)Sean Michael Wykes
This commit adds support for specifying client certificates when using fetch, by means of `Deno.createHttpClient`.
2021-08-25refactor: cleanup Inspector and InspectorServer implementations (#11837)Bartek Iwańczuk
2021-08-16feat(runtime): support classic workers for internal testing (#11338)Andreu Botella
This commit implements classic workers, but only when the `--enable-testing-features-do-not-use` flag is provided. This change is not user facing. Classic workers are used extensively in WPT tests. The classic workers do not support loading from disk, and do not support TypeScript. Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-11chore: move test files to testdata directory (#11601)David Sherret
2021-08-10refactor: --unsafely-ignore-certificate-errors (#11629)Bartek Iwańczuk
2021-08-09feat: Add --unsafely-treat-insecure-origin-as-secure flag to disable SSL ↵TheAifam5
verification (#11324) This commit adds "--unsafely-treat-insecure-origin-as-secure" flag that allows to disable SSL verification for all domains, or specific domains if they were passed as an argument to the flag. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-08-07feat(tls): Optionally support loading native certs (#11491)Justin Chase
This commit adds "DENO_TLS_CA_STORE" env variable to support optionally loading certificates from the users local certificate store. This will allow them to successfully connect via tls with corporate and self signed certs provided they have them installed in their keystore. It also allows them to deal with revoked certs by simply updating their keystore without having to upgrade Deno. Currently supported values are "mozilla", "system" or empty value.
2021-08-06feat: ffi to replace plugins (#11152)Elias Sjögreen
This commit removes implementation of "native plugins" and replaces it with FFI API. Effectively "Deno.openPlugin" API was replaced with "Deno.dlopen" API.
2021-07-30chore(core): use oneshot channel in mod_evaluate() (#11556)Ben Noordhuis
Oneshot is more appropriate because mod_evaluate() only sends a single value. It also makes it easier to use it correctly. As an embedder, I wasn't sure if I'm expected to drain the channel or not.
2021-07-29feat(runtime): implement navigator.hardwareConcurrency (#11448)Divy Srivastava
This commit implements "navigator.hardwareConcurrency" API, which supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
2021-07-28feat(extensions/fetch): extend init options (#11528)Satya Rohith
2021-07-22fix: support --cert flag for tls connect APIs (#11484)Luca Casonato
2021-07-12refactor: deno_http op crate (#11335)Luca Casonato
2021-07-11Revert "Remove unstable native plugins (#10908)"Ryan Dahl
This reverts commit 7dd4090c2a3dc0222fd6ff611eeb2bd69cd28224.
2021-07-08feat(core): return v8::Value from JsRuntime::execute_script (#11129)Bartek Iwańczuk
This commit changes return type of JsRuntime::execute_script to include v8::Value returned from evaluation. When embedding deno_core it is sometimes useful to be able to inspect script evaluation value without the hoops of adding ops to store the value on the OpState. v8::Global<v8::Value> is used so consumers don't have to pass scope themselves.
2021-07-06feat: support SharedArrayBuffer sharing between workers (#11040)Luca Casonato
This commit adds support for sharing SABs between workers.
2021-07-05refactor: asynchronous blob backing store (#10969)Jimmy Wärting
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-07-02Remove unstable native plugins (#10908)Bartek Iwańczuk
This commit removes implementation of native plugins alongside the unstable "Deno.openPlugin()" API.
2021-06-30feat(inspector): improve inspector prompt in Chrome Devtools (#11187)Bartek Iwańczuk
This commit improves how Deno inspector presents itself in Chrome Devtools.
2021-06-29chore: get rid of REPL timeout (#11175)Bert Belder
* Get rid of timeout * Use tokio channel and reduce calls to run_event_loop Co-authored-by: David Sherret <dsherret@gmail.com>
2021-06-29feat: Add "deno_net" extension (#11150)Bartek Iwańczuk
This commits moves implementation of net related APIs available on "Deno" namespace to "deno_net" extension. Following APIs were moved: - Deno.listen() - Deno.connect() - Deno.listenTls() - Deno.serveHttp() - Deno.shutdown() - Deno.resolveDns() - Deno.listenDatagram() - Deno.startTls() - Deno.Conn - Deno.Listener - Deno.DatagramConn
2021-06-22feat(fetch): add programmatic proxy (#10907)Tomofumi Chiba
This commit adds new options to unstable "Deno.createHttpClient" API. "proxy" and "basicAuth" options were added that allow to use custom proxy when client instance is passed to "fetch" API.
2021-06-22refactor: unify JavaScript script execution method (#11043)Bartek Iwańczuk
This commit renames "JsRuntime::execute" to "JsRuntime::execute_script". Additionally same renames were applied to methods on "deno_runtime::Worker" and "deno_runtime::WebWorker". A new macro was added to "deno_core" called "located_script_name" which returns the name of Rust file alongside line no and col no of that call site. This macro is useful in combination with "JsRuntime::execute_script" and allows to provide accurate place where "one-off" JavaScript scripts are executed for internal runtime functions. Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>