0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

6503 commits

Author SHA1 Message Date
李瑞丰
46245b830a
fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-09-25 02:07:22 +09:00
Ryan Dahl
9705efd419
refactor: Remove op_state parameter (#12202) 2021-09-24 11:11:16 -04:00
Ryan Dahl
01da1d0adc
refactor: Rename ProgramState to ProcState (#12204)
Move Arc into struct
2021-09-24 11:10:42 -04:00
Leo K
703ca905fd
docs: fix native http jsdoc examples (#12207) 2021-09-24 19:14:12 +09:00
Nayeem Rahman
faefe2300d
fix(cli/permissions): ensure revoked permissions are no longer granted (#12159)
Fixes #12153
2021-09-24 15:48:15 +10:00
Ryan Dahl
80a9a37df1
refactor: Remove depreated Worker::execute_module (#12203) 2021-09-23 21:46:22 -04:00
Ryan Dahl
da25bbff88
refactor: clean up watcher tests (#12200) 2021-09-23 15:12:22 -04:00
Satya Rohith
c5442abc23
feat(cli/fmt): support more markdown extensions (#12195) 2021-09-23 21:49:25 +05:30
Aaron O'Mullan
e0c858fa27
perf(ext/fetch): skip USVString webidl conv on string constructor (#12168)
* perf(ext/fetch): skip USVString webidl conv on string constructor
* Rename webidl convert to RequestInfo_DOMString

To disambiguate and hint that it normalizes to DOMString instead of USVString since DOMString => USVString is handled by `op_url_parse` when calling `new URL(...)`
2021-09-23 11:40:58 +02:00
Casper Beyer
830586d242
test(cli): align unit test permissions with runtime test permissions (#12189) 2021-09-23 01:50:50 +02:00
Kitson Kelly
87e78802b0
docs(tools): updates to cutting a release (#12177) 2021-09-23 09:12:56 +10:00
Aaron O'Mullan
a33ee087ce
perf(ops): optimize permission check (#11800)
* perf(ops): optimize permission check

Removes the overhead of permission check on access granted (should be common case):

Delta measured on `perf_now` from `deno_common` bench:
- before: `528ns/op
- after: `166ns/op`

So ~3x faster
2021-09-23 00:45:58 +02:00
Aaron O'Mullan
845a27e748
ci: enable cache for fastci (#12186) 2021-09-22 23:37:18 +02:00
Ryan Dahl
18fff69946
refactor: simplify FetchFuture (#12185)
No need for static lifetime
2021-09-22 15:35:07 -04:00
Aaron O'Mullan
6decc4dd38
quickfix(ci): only run "Build product size info" on main/tag (#12184) 2021-09-22 21:01:32 +02:00
Ryan Dahl
958b374f09
upgrade serde_v8 and rusty_v8 (#12175)
* upgrade serde_v8 and rusty_v8

* rusty_v8 0.30.0

* cycle keys
2021-09-22 18:51:11 +02:00
Andreu Botella
5c5f4ea1d6
fix(workers): Don't panic when a worker's parent thread stops running (#12156)
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-22 18:02:15 +02:00
Aaron O'Mullan
eddae41482
ci: experiment mac & windows debug builds (#11884)
Will be tweaked, but possibly have this "fastci" profile for further optimizations
2021-09-22 17:15:04 +02:00
Casper Beyer
20692f3e84
chore: replace calls to assertThrowsAsync with assertRejects (#12176) 2021-09-22 09:21:11 -04:00
Ben Noordhuis
82cfb46bd1
chore(ext/net): improve embedder friendliness (#12178)
Default to None if UnsafelyIgnoreCertificateErrors is not present in the
OpState.

Embedders may not have a need for restricting outgoing TLS connections
and having them hunt through the source code for the magic incantation
that makes the borrow panics go away, is less user friendly.
2021-09-22 11:12:08 +02:00
Kitson Kelly
f27902e749
1.14.1 2021-09-22 08:44:46 +10:00
Kitson Kelly
2a56cd545c
chore: bump crate versions for 1.14.1 (#12172) 2021-09-22 06:53:47 +10:00
Aaron O'Mullan
22a6f4166e
cleanup(ext/fetch): drop redundant webidl converters in fetch() (#12167)
Since those inputs are passed to `new Request(...)` which applies webidl converters
2021-09-21 18:51:56 +02:00
Aaron O'Mullan
0aa6fefce7
perf(ext/web): optimize EventTarget (#12166)
and all its subclasses including `AbortSignal` ...

Instead of storing associated data in a global `WeakMap` we store them as private attributes (via a Symbol) on the object instances
2021-09-21 17:51:44 +02:00
Aaron O'Mullan
f827b93df4
perf(web): optimize AbortController (#12165)
- Use regular class constructor and symbol "private" attributes
- Lazy init Set of follower signals
2021-09-21 17:38:57 +02:00
MikaelUrankar
8375f5464b
fix(runtime/ops/signal.rs): Add FreeBSD signal definitions (#12084) 2021-09-21 09:16:05 -04:00
Aaron O'Mullan
ac8b6689b2
bench(deno_common): track new Request() (#12164)
Indirectly tests for:
- url parsing
- abort signal no-ops
- webidl & other overhead
2021-09-21 12:34:27 +02:00
Satya Rohith
923c5432e0
chore: bump deno_net (#12157) 2021-09-21 09:20:21 +05:30
David Sherret
0f23d92601
chore(tests): windows pty tests (#12091) 2021-09-20 22:15:44 -04:00
Elias Sjögreen
60b68e63f1
test(ext/ffi): add tests for different parameter and return types (#12158) 2021-09-20 15:42:54 -07:00
Eyal Shalev
7c9c9e5c83
fix(config-schema): correct default value of "lib" (#12145)
Changed it from `"deno.window"` to `["deno.window"]`
2021-09-20 11:30:00 -04:00
Satya Rohith
3708cbc600
refactor(ext/net): make op_connect & op_connect_tls public (#12150) 2021-09-20 19:35:23 +05:30
Casper Beyer
269bf380e0
fix(cli): move Deno.flock and Deno.funlock to unstable types (#12138) 2021-09-19 14:46:54 +02:00
Casper Beyer
e1144fd635
refactor(cli): don't generate a module for side loading tests (#12129) 2021-09-18 16:12:50 +02:00
Nayeem Rahman
75ca013f07
fix(cli/fmt_errors): Abbreviate long data URLs in stack traces (#12127)
Co-authored-by: Mike White <mike.white@auctane.com>
2021-09-18 15:40:04 +02:00
Bartek Iwańczuk
f840906943
fix(core): prevent multiple main module loading (#12128)
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-09-18 03:44:53 +02:00
David Sherret
7c0173df27
chore(tests): maybe fix flaky flock tests (#12122) 2021-09-17 14:17:01 -04:00
David Sherret
4c8ab33def
chore(tests): fix flaky fetchPostBodyTypedArray (#12104) 2021-09-17 09:02:44 -04:00
David Sherret
c8b43a0328
chore(tests): fix flaky flock tests (#12099) 2021-09-17 09:02:23 -04:00
Squirrel
4b79e5a459
chore: Remove unused deps from Cargo.toml files (#12106) 2021-09-17 14:39:32 +02:00
Kitson Kelly
99de9eb4c2
fix(cli): don't ignore diagnostics about for await (#12116)
Fixes #12115
2021-09-17 16:54:52 +10:00
Aaron O'Mullan
00948a6d68
perf(runtime/fs): optimize readFile by using a single large buffer (#12057)
* perf(runtime/fs): optimize readFile by using a single large buffer
* handle extended/truncated files during read

Allocate an extra byte in our read buffer to detect "overflow" then fallback to unsized readAll for remainder of extended file, this is a slowpath that should rarely happen in practice
2021-09-16 20:28:15 +02:00
Divy Srivastava
868f38d452
fix(ext/crypto): use DataError in importKey() (#12071) 2021-09-16 09:58:29 +02:00
Divy Srivastava
9270cad67c
fix(ext/crypto): don't use core.decode for encoding jwk keys (#12088) 2021-09-16 09:12:38 +02:00
Satya Rohith
3c97dbf06b
chore: update tagline (#12095) 2021-09-16 11:55:06 +05:30
Kitson Kelly
ccb3387946
fix(lsp): align filter text to vscode logic (#12081)
Fixes #11861
2021-09-16 12:07:52 +10:00
David Sherret
4283e2907e
chore(scripts): improvements to the release scripts based on the 1.14 release (#12079) 2021-09-15 09:16:06 -04:00
Satya Rohith
badc87e657
chore(lsp): use pretty_assertions in e2e tests (#12083) 2021-09-15 16:04:17 +05:30
David Sherret
f92cc66f0d
1.14.0 (#12074) 2021-09-14 16:46:36 -04:00
David Sherret
16c27fce1f
chore: bump crate versions for 0.14 (#12072) 2021-09-14 15:38:35 -04:00