Nick Vatamaniuc
fdc6ba3bec
Add CONFIG_NO_WORKER Makefile option
...
This option eliminates the dependency on the pthread library. This mode is
already toggled on _WIN32 and/or EMSCRIPTEN is detected, here we just allow the
user to toggle it at will at the top level.
This slightly reduce the code size as well, and may allow compiling this
library in some embedded contexts where pthread is not available or is broken.
2024-08-26 15:41:10 -04:00
Pino Toscano
012451d5f3
Define a fallback PATH_MAX if not available
...
PATH_MAX is optional in POSIX, and it is not available on GNU/Hurd.
While it could be possible to not rely on PATH_MAX, for now provide a
fallback definition (which should be safe enough) to get quickjs built
on GNU/Hurd.
2024-07-21 10:24:01 +02:00
Pino Toscano
8624b5c6f0
Use ftello() & fseeko() on any OS based on GNU libc
...
Strictly speaking, they are available in POSIX.1-2008 [1][2], so they
could be used on more platforms/OSes. To be cautious, enable them when
using GNU libc, since they have been available with that libc for a
very long time.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftell.html
[2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html
2024-07-21 10:24:01 +02:00
Charlie Gordon
d378a9f3a5
Improve js_os_exec
( #295 )
...
- use $(shell) make command to test if closefrom() is available
- use closefrom() if available in js_os_exec()
- limit the fallback loop to 1024 handles to avoid costly loop on linux alpine.
PR inspired by @nicolas-duteil-nova
2024-05-10 01:57:55 +02:00
Charlie Gordon
c0e67c47cd
Simplify redundant initializers for JS_NewBool()
2024-03-23 09:28:38 +01:00
Charlie Gordon
1a5333bcb3
prevent 0 length allocation in js_worker_postMessage
2024-03-03 14:42:01 +01:00
Charlie Gordon
92e339d14f
Simplify and clarify URL quoting js_std_urlGet
2024-02-12 18:34:52 +01:00
Nick Vatamaniuc
636c946531
FreeBSD QuickJS Patch ( #203 )
2024-02-12 11:28:00 +01:00
Felix S
ae6fa8d3d2
Fix shell injection bug in std.urlGet ( #61 )
2024-02-12 11:20:25 +01:00
Charlie Gordon
48deab1aeb
Fix runtime bugs
...
- fix string leak in `js_printf_internal` on errors
- read `errno` before potential side effects in `js_os_stat`
2024-02-11 12:49:40 +01:00
Charlie Gordon
37bd4ae62d
Strip trailing spaces
2024-02-10 16:19:17 +01:00
Fabrice Bellard
67723c93e4
fixed js_std_await() in case 'obj' is not a promise (github issue #222 )
2024-01-22 18:03:35 +01:00
Fabrice Bellard
9e561d5c2e
fixed and simplified setTimeout() by using an integer timer handle (github issue #218 )
2024-01-19 10:20:34 +01:00
Fabrice Bellard
84058766e9
added js_std_await() and use it to wait for the evaluation of a module (github issue #219 )
2024-01-19 10:19:58 +01:00
Fabrice Bellard
195c42b9fb
added os.getpid()
2024-01-11 15:25:28 +01:00
Fabrice Bellard
e44b793e38
allow 'await' in the REPL and added os.sleepAsync()
2024-01-02 16:09:30 +01:00
Fabrice Bellard
2ee6be705f
added os.now()
2023-12-27 19:09:29 +01:00
Fabrice Bellard
6e4931c4ad
top-level-await support - follow the spec in the implementation of the module linking and evaluation to avoid errors with cycling module dependencies
2023-12-27 17:10:47 +01:00
bellard
b5e62895c6
2021-03-27 release
2021-03-27 11:17:31 +01:00
bellard
b1f67dfc1a
2020-11-08 release
2020-11-08 14:30:56 +01:00
bellard
7c312df422
2020-09-06 release
2020-09-06 19:10:15 +02:00
bellard
8900766099
2020-07-05 release
2020-09-06 19:07:30 +02:00
bellard
1722758717
2020-04-12 release
2020-09-06 19:04:20 +02:00
bellard
383e2b06c8
2020-03-16 release
2020-09-06 19:02:03 +02:00
bellard
0e8fffd4de
2020-01-19 release
2020-09-06 18:57:11 +02:00
bellard
91459fb672
2020-01-05 release
2020-09-06 18:53:08 +02:00