Skip to content

Commit f8317e9

Browse files
committed
QuickJS features and fixes: closure optimization, iterators, UAF
* Closure optimization quadratic -> linear on number of vars bellard/quickjs@ae7219b * Add error checking in `JS_InstantiateFunctionListItem()` bellard/quickjs@125b012 * Optimize add/sub int32 overflow bellard/quickjs@3d0cc29 * Add `Iterator.concat` bellard/quickjs@4bd485d * Fix BJSON array serialization (fixes use-after-free in bellard/quickjs#457) bellard/quickjs@fcbf5ea
1 parent 888e5b8 commit f8317e9

5 files changed

Lines changed: 579 additions & 209 deletions

File tree

src/couch_quickjs/patches/01-spidermonkey-185-mode.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- quickjs-master/quickjs.c 2025-11-05 05:46:20
2-
+++ quickjs/quickjs.c 2025-11-05 09:54:50
3-
@@ -31286,10 +31286,24 @@
1+
--- quickjs-master/quickjs.c 2025-11-15 08:52:50
2+
+++ quickjs/quickjs.c 2025-11-17 17:35:22
3+
@@ -31337,10 +31337,24 @@
44
if (s->token.val == TOK_FUNCTION ||
55
(token_is_pseudo_keyword(s, JS_ATOM_async) &&
66
peek_token(s, TRUE) == TOK_FUNCTION)) {

src/couch_quickjs/patches/02-test262-errors.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- quickjs-master/test262_errors.txt 2025-11-05 05:46:20
2-
+++ quickjs/test262_errors.txt 2025-11-05 09:54:50
1+
--- quickjs-master/test262_errors.txt 2025-11-15 08:52:50
2+
+++ quickjs/test262_errors.txt 2025-11-17 17:35:22
33
@@ -19,6 +19,8 @@
44
test262/test/language/expressions/compound-assignment/S11.13.2_A6.10_T1.js:24: Test262Error: #1: innerX === 2. Actual: 5
55
test262/test/language/expressions/compound-assignment/S11.13.2_A6.11_T1.js:24: Test262Error: #1: innerX === 2. Actual: 5

src/couch_quickjs/quickjs/quickjs-atom.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ DEF(WeakMap, "WeakMap") /* Map + 2 */
233233
DEF(WeakSet, "WeakSet") /* Map + 3 */
234234
DEF(Iterator, "Iterator")
235235
DEF(IteratorHelper, "Iterator Helper")
236+
DEF(IteratorConcat, "Iterator Concat")
236237
DEF(IteratorWrap, "Iterator Wrap")
237238
DEF(Map_Iterator, "Map Iterator")
238239
DEF(Set_Iterator, "Set Iterator")

0 commit comments

Comments
 (0)