about summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update chagashibptato2024-12-071-5/+5
|
* Update monouchabptato2024-11-251-5/+5
|
* dom: add document named property getter, update monouchabptato2024-11-221-5/+5
|
* Update chamebptato2024-11-221-5/+5
|
* Update monoucha, fix some JS testsbptato2024-11-181-5/+5
|
* network.chasc: allow gettimeofday toobptato2024-11-181-0/+3
| | | | continuation of 79d832c37
* network.chasc: allow clock_gettimebptato2024-11-171-0/+6
| | | | | | | ref. https://todo.sr.ht/~bptato/chawan/23 TODO: I'm not quite sure *why* it's getting called. curls operate in mysterious ways.
* Update monouchabptato2024-11-161-5/+5
|
* Update monouchabptato2024-11-091-5/+5
|
* Fix some C warnings, more makefile vars, etc.bptato2024-11-083-13/+17
| | | | | | | * add some more env vars to makefile * remove fpermissive from GCC builds * update Monoucha * fix borked seccomp filter length safety check (ugh)
* chaseccomp: update docs, remove redundant importbptato2024-11-072-7/+11
|
* chaseccomp: lock down clone; fix mprotect on bionicbptato2024-11-045-10/+23
| | | | | | | | | | | * add restrictions on clone for buffer filter - hardcoded it for musl, glibc and bionic. hopefully they don't change it too soon... * remove define directive from gen_syscalls - now the arch nr check is hardcoded in gen_defs. makes things a bit less complex. * fix borked mprotect filter on bionic - this completely broke the browser.
* chaseccomp: revert parts of d9ca197ebptato2024-10-313-5/+6
| | | | | | | | | * abort on network sandbox violation - it's probably better not to, but I want to think this through a bit more before changing it for good (and then do it consistently, i.e. also for the buffer process.) * revert case variable quoting - the lack of field splitting is specified by POSIX, and the readme states that we target POSIX. no need to be paranoid about imaginary shells.
* chaseccomp: fix compilation with newest dash, misc changesbptato2024-10-316-21/+70
| | | | | | | | | | | | | | * fix matching on unstripped whitespace: caught after upgrading to upstream dash & chaseccomp wouldn't compile * add defines to ensure that we computed the filter length correctly * inline cut_label * EPERM on sigaction, sigprocmask, gettid, and kill on tgkill (so a crash doesn't trigger sandbox violations) * move SIGSYS handler to C and add one for the network The last change removes the stack trace from SIGSYS, but gives us the syscall number which is probably more useful. (Indeed, we don't even have a stack trace in release builds.)
* Update monouchabptato2024-10-281-5/+5
|
* chaseccomp: update readmebptato2024-10-261-3/+3
|
* sandbox: replace libseccomp with chaseccompbptato2024-10-2310-0/+487
| | | | | | | | | | | | | | | This drops libseccomp as a dependency. Also, move the capsicum/pledge definitions from bindings to sandbox.nim because they are only used there. Interestingly, after integrating chaseccomp I found that the stbi process would mysteriously crash by a getrandom(2) syscall. Closer investigation revealed it is only called on the initialization of glibc's malloc; presumably it had never surfaced before because libseccomp would always allocate before entering the sandbox. So I've added getrandom to our filter as well.
* Update monouchabptato2024-10-121-5/+5
|
* Update Chagashibptato2024-10-051-5/+5
|
* Update monouchabptato2024-10-021-5/+5
|
* Update monouchabptato2024-09-291-5/+5
| | | | | Now we use QuickJS-NG, which is better maintained than QJS and has column tracking.
* Update monouchabptato2024-09-171-5/+5
| | | | I meant to fix this enum bug in the previous patch but then I forgot...
* dom: add forms, elements getter + misc fixesbptato2024-09-171-5/+5
| | | | | | | | | | | | * add document.forms * add form.elements * remove redundant jshasprop functions * use mpairs for attribute iteration (mpairs use pointers, but pairs copies) * fix remove() crash * fix remove() collection invalidation for children (if parent is not in the collection) * update monoucha
* Update chagashibptato2024-09-061-5/+5
|
* Update chagashibptato2024-09-011-5/+5
|
* Update monouchabptato2024-08-221-5/+5
|
* xhr: more progressbptato2024-08-151-5/+5
| | | | | | | | | | * add responseText, response * add net tests -> currently sync XHR only; should find a way to do async tests... * update monoucha -> simplified & updated some related code that no longer worked properly
* Update monouchabptato2024-08-091-5/+5
|
* Update monouchabptato2024-08-091-5/+5
|
* Update Chagashibptato2024-08-011-5/+5
|
* Update submodulesbptato2024-07-283-15/+15
|
* Update monouchabptato2024-07-181-5/+5
|
* Update monouchabptato2024-07-171-5/+5
|
* Update monouchabptato2024-06-221-5/+5
|
* buffer: decoding fixesbptato2024-06-141-5/+5
| | | | | | * simplify processData * set document charset on creation * update chagashi
* Update Chame, Chagashibptato2024-06-132-10/+10
|
* Move JS wrapper into Monouchabptato2024-06-0317-77220/+6
| | | | Operation "modularize Chawan somewhat" part 3
* js: fix runtime cleanupbptato2024-06-032-0/+11
| | | | | | | | | | | | | | This is a minefield. Intuitively, you would think that just clearing the opaque and manually freeing registered object should be enough. Unfortunately, this is not true; we do not store whether we are actually holding a reference to registered JS objects, so this approach leads to double frees. Instead, we add a QJS callback that is called right after the final GC cleanup, but before the list_free assertion. This way, we can be sure that any object still in our registry is referenced by us, and can therefore unreference them safely.
* regexp: fix non greedy quantizers with zero length matchesFabrice Bellard2024-05-301-8/+6
|
* Add `js_resolve_proxy` (#293)Charlie Gordon2024-05-301-20/+35
| | | | | - simplify `JS_IsArray` for proxy chains - remove `js_proxy_isArray`
* Add `JS_StrictEq()`, `JS_SameValue()`, and `JS_SameValueZero()` (#264)Kasper Isager Dalsgarð2024-05-302-5/+26
| | | | | | * add `JS_StrictEq()`, `JS_SameValue()`, and `JS_SameValueZero()` all accepting `JSValueConst` * make `js_strict_eq` accept `JSValueConst`, remove uses of this function internally and replace them with `js_strict_eq2` instead.
* Expose `JS_SetUncatchableError()` (#262)Kasper Isager Dalsgarð2024-05-302-1/+1
| | | | | | * Expose `JS_SetUncatchableError()` * Remove unnecessary `JS_SetUncatchableError` declaration
* Add `JS_HasException()` (#265)Kasper Isager Dalsgarð2024-05-302-0/+6
|
* Add `JS_NewTypedArray()` (#272)Dmitry Volyntsev2024-05-302-0/+27
|
* quickjs: revert SetUncatchableError patchbptato2024-05-301-1/+0
| | | | taking it from upstream
* libunicode: fix compilationbptato2024-05-071-1/+1
|
* Improve class parser (#289)Charlie Gordon2024-05-071-3/+9
| | | | | | - accept `class P { async = 1 }}` - accept `class P { static = 1 }}` etc. - Fixes #261
* fix class method with name get (#258)Richard Davison2024-05-071-1/+2
| | | | Co-authored-by: Richard Davison <ridaviso@amazon.com>
* Improve libunicode and libregexp headers (#288)Charlie Gordon2024-05-075-128/+237
| | | | | | | | - move all `lre_xxx` functions to libunicode - use flags table `lre_ctype_bits` instead of bitmaps - simplify `lre_is_space`, `lre_js_is_ident_first` and `lre_js_is_ident_next` - simplify `simple_next_token`, handle UTF-8 correctly - simplify `is_let`, remove dead code
* Improve unicode table handling (#286)Charlie Gordon2024-05-072-49/+148
| | | | | | | | - Document table and index formats - Add size statistics - Fix UBSAN issue in `get_le24()` Fixes #285