Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
Changes with njs 0.9.1 10 Jul 2025

nginx modules:

*) Feature: added Fetch API for QuickJS engine.

*) Feature: added state file for a shared dictionary.

*) Bugfix: fixed handling of Content-Length header when
a body is provided for Fetch API.

*) Bugfix: fixed qjs engine after bellard/quickjs@458c34d2.

*) Bugfix: fixed NULL pointer dereference when processing
If-* headers.

Core:

*) Feature: added ECDH support for WebCrypto.

*) Improvement: reduced memory consumption by the object hash.
The new hash uses 42% less memory per element.

*) Improvement: reduced memory consumption for concatenation of
numbers and strings.

*) Improvement: reduced memory consumption of
String.prototype.concat() with scalar values.

*) Bugfix: fixed segfault in njs_property_query().
The issue was introduced in b28e50b1 (0.9.0).

*) Bugfix: fixed Function constructor template injection.

*) Bugfix: fixed GCC compilation with O3 optimization level.

*) Bugfix: fixed constant is too large for 'long' warning
on MIPS -mabi=n32.

*) Bugfix: fixed compilation with GCC 4.1.

*) Bugfix: fixed %TypedArray%.from() with the buffer is detached
by the mapper.

*) Bugfix: fixed %TypedArray%.prototype.slice() with overlapping
buffers.

*) Bugfix: fixed handling of detached buffers for typed arrays.

*) Bugfix: fixed frame saving for async functions with
closures.

*) Bugfix: fixed RegExp compilation of patterns with
escaped '[' characters.

Changes with njs 0.9.0 06 May 2025

Core:
Expand Down
7 changes: 4 additions & 3 deletions src/njs_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ njs_inline njs_bool_t
njs_is_data_descriptor(njs_object_prop_t *prop)
{
return (prop->type == NJS_PROPERTY && njs_is_valid(njs_prop_value(prop)))
|| prop->type == NJS_PROPERTY_REF
|| prop->type == NJS_PROPERTY_PLACE_REF
|| prop->type == NJS_PROPERTY_HANDLER;
|| prop->type == NJS_PROPERTY_HANDLER
|| prop->type == NJS_PROPERTY_REF
|| prop->type == NJS_PROPERTY_PLACE_REF
|| prop->type == NJS_PROPERTY_TYPED_ARRAY_REF;
}


Expand Down
6 changes: 6 additions & 0 deletions src/test/njs_unit_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5908,6 +5908,12 @@ static njs_unit_test_t njs_test[] =
" catch (e) { return e.message == 'Cannot redefine property: \"1\"'}})"),
njs_str("true") },

{ njs_str(NJS_TYPED_ARRAY_LIST
".every(v=>{Object.defineProperty(v.prototype, '0', {set(){ throw 'Oops' }});"
" var t = new v([0]); var r = Object.create(t);"
" r[0] = 1; return true})"),
njs_str("true") },

{ njs_str(NJS_TYPED_ARRAY_LIST
".every(v=>{try {var a = new v([1,1]); Object.defineProperty(a, '1', {get(){return 22}})} "
" catch (e) { return e.message == 'Cannot redefine property: \"1\"'}})"),
Expand Down