]> git.kaiwu.me - njs.git/log
njs.git
3 years agoModules: common code for js_import is moved to shared library.
Vadim Zhestikov [Wed, 14 Sep 2022 04:13:17 +0000 (21:13 -0700)]
Modules: common code for js_import is moved to shared library.

3 years agoParser: fixed async token as a property name of an object.
Dmitry Volyntsev [Tue, 13 Sep 2022 00:56:44 +0000 (17:56 -0700)]
Parser: fixed async token as a property name of an object.

This closes #575 issue on Github.

3 years agoImproved njs_mp_free() to aling with free() semantics.
Dmitry Volyntsev [Thu, 8 Sep 2022 17:03:25 +0000 (10:03 -0700)]
Improved njs_mp_free() to aling with free() semantics.

Previously, njs_mp_free() issued an assertion when p == NULL, while NULL
argument is explicitly allowed for free().

3 years agoFixed Object.defineProperty() with fast arrays.
Vadim Zhestikov [Wed, 7 Sep 2022 01:44:47 +0000 (18:44 -0700)]
Fixed Object.defineProperty() with fast arrays.

Previously, Object.defineProperty() failed to properly set attributes for properties of fast array.

3 years agoFixed Object.freeze() with fast arrays.
Vadim Zhestikov [Tue, 6 Sep 2022 18:13:31 +0000 (11:13 -0700)]
Fixed Object.freeze() with fast arrays.

Previously, Object.freeze() failed to freeze the 'length' property of a fast array.

3 years agoWebCrypto: fixed dangling pointer warning by gcc-12.
Dmitry Volyntsev [Tue, 6 Sep 2022 17:09:08 +0000 (10:09 -0700)]
WebCrypto: fixed dangling pointer warning by gcc-12.

3 years agoFixed typo introduced in a37e4df8f082.
Dmitry Volyntsev [Fri, 2 Sep 2022 01:12:27 +0000 (18:12 -0700)]
Fixed typo introduced in a37e4df8f082.

3 years agoAdded error handling for NJS_VMCODE_FUNCTION_COPY instruction.
Dmitry Volyntsev [Fri, 2 Sep 2022 00:49:06 +0000 (17:49 -0700)]
Added error handling for NJS_VMCODE_FUNCTION_COPY instruction.

This closes #572 issue on Github.

3 years agoFixed String.prototype.trimEnd() with unicode string.
Dmitry Volyntsev [Thu, 1 Sep 2022 01:35:58 +0000 (18:35 -0700)]
Fixed String.prototype.trimEnd() with unicode string.

Previously, when the method was invoked with a string consisting of space
characters and at least one of them was a Unicode space separator (code
point above 127) it returned invalid string value with non-zero size
but zero length.

The fix is to update the size of the resulting string appropriately.

This closes #569 issue on Github.

3 years agoAdded ngx.conf_prefix.
Dmitry Volyntsev [Wed, 31 Aug 2022 23:52:16 +0000 (16:52 -0700)]
Added ngx.conf_prefix.

3 years agoVersion bump.
Dmitry Volyntsev [Wed, 31 Aug 2022 23:52:10 +0000 (16:52 -0700)]
Version bump.

3 years agoAdded tag 0.7.7 for changeset 1592d46d9076
Dmitry Volyntsev [Tue, 30 Aug 2022 04:33:29 +0000 (21:33 -0700)]
Added tag 0.7.7 for changeset 1592d46d9076

3 years agoVersion 0.7.7. 0.7.7
Dmitry Volyntsev [Tue, 30 Aug 2022 04:18:20 +0000 (21:18 -0700)]
Version 0.7.7.

3 years agoFixed njs_value_to_string() with non-writable dst argument.
Dmitry Volyntsev [Tue, 30 Aug 2022 04:09:12 +0000 (21:09 -0700)]
Fixed njs_value_to_string() with non-writable dst argument.

njs_arg(args, nargs, N) returns a pointer to Nth argument OR a pointer
to undefined constant value njs_value_undefined if N >= nargs.
njs_value_to_string() writes to a dst argument its result.
This means that it is incorrect to use value of njs_arg() directly
as a second argument to njs_value_to_string().

This closes #570 issue on Github.

3 years agoRemoved dead code introduced in f70929728e86.
Dmitry Volyntsev [Tue, 30 Aug 2022 04:09:11 +0000 (21:09 -0700)]
Removed dead code introduced in f70929728e86.

Found by Coverity (CID 15125541512556).

3 years agoFixed typo introduced in f70929728e86.
Dmitry Volyntsev [Tue, 30 Aug 2022 04:08:47 +0000 (21:08 -0700)]
Fixed typo introduced in f70929728e86.

Found by Coverity (CID 15125531512555).

3 years agoWebCrypto: fixed sign and verify methods for ECDSA.
Dmitry Volyntsev [Sat, 27 Aug 2022 04:49:14 +0000 (21:49 -0700)]
WebCrypto: fixed sign and verify methods for ECDSA.

3 years agoHTTP: added r.internal property.
Dmitry Volyntsev [Thu, 25 Aug 2022 23:57:28 +0000 (16:57 -0700)]
HTTP: added r.internal property.

3 years agoModules: sorting external object property descriptors alphabetically.
Dmitry Volyntsev [Thu, 25 Aug 2022 00:04:58 +0000 (17:04 -0700)]
Modules: sorting external object property descriptors alphabetically.

3 years agoStream: improved s.send() with async callbacks.
Dmitry Volyntsev [Wed, 24 Aug 2022 02:36:16 +0000 (19:36 -0700)]
Stream: improved s.send() with async callbacks.

Previously, s.send() was a context dependant method because the
direction it was sending data to was determined by a callback (upstream
or downstream) it was called from.  This works for synchronous
callbacks it was originally designed, but fails with async functions
(e.g. ngx.fetch()).

The fix is to store the direction data was going to as a separate flag
which can be used by s.send().

3 years agoTypes: added ts types for the recent fs API.
Dmitry Volyntsev [Tue, 23 Aug 2022 05:03:15 +0000 (22:03 -0700)]
Types: added ts types for the recent fs API.

3 years agoAdded fs.FileHandle.
Dmitry Volyntsev [Mon, 22 Aug 2022 23:49:27 +0000 (16:49 -0700)]
Added fs.FileHandle.

The following methods are implemented:
    - fs.openSync(path[, flag[, mode]])
    - fs.promises.open(path[, flag[, mode]])
    - fs.fstatSync(fd)
    - fs.readSync(fd, buffer, offset[, length[, position]])
    - fs.writeSync(fd, buffer, offset[, length[, position]])
    - fs.writeSync(fd, string[, position[, encoding]])

The following properties of FileHandle are implemented:
    - filehandle.fd
    - filehandle.read(buffer, offset, [length[, position]])
    - filehandle.stat()
    - filehandle.write(buffer, offset, [length[, position]])
    - filehandle.write(string[, position[, encoding]])
    - filehandle.close()

3 years agoAdded generic handler for external objects.
Dmitry Volyntsev [Sat, 20 Aug 2022 05:03:06 +0000 (22:03 -0700)]
Added generic handler for external objects.

3 years agoModules: improved generic external getters.
Dmitry Volyntsev [Sat, 20 Aug 2022 05:02:37 +0000 (22:02 -0700)]
Modules: improved generic external getters.

3 years agoTests: improved fs test262 tests robustness with different environment.
Dmitry Volyntsev [Sat, 20 Aug 2022 04:38:55 +0000 (21:38 -0700)]
Tests: improved fs test262 tests robustness with different environment.

3 years agoStream: improved flags argument for s.on() callback methods.
Dmitry Volyntsev [Thu, 11 Aug 2022 03:04:40 +0000 (20:04 -0700)]
Stream: improved flags argument for s.on() callback methods.

3 years agoStream: removed unused field ctx->from_upstream.
Dmitry Volyntsev [Thu, 11 Aug 2022 03:03:54 +0000 (20:03 -0700)]
Stream: removed unused field ctx->from_upstream.

3 years agoFixed ts_test target on MacOS.
Dmitry Volyntsev [Tue, 9 Aug 2022 06:18:51 +0000 (23:18 -0700)]
Fixed ts_test target on MacOS.

3 years agoModules: fixed socket leak with 0 fetch timeout.
Dmitry Volyntsev [Tue, 9 Aug 2022 05:41:34 +0000 (22:41 -0700)]
Modules: fixed socket leak with 0 fetch timeout.

3 years agoIncreased njs_printf() output limit to 16384 bytes.
Dmitry Volyntsev [Thu, 4 Aug 2022 03:47:41 +0000 (20:47 -0700)]
Increased njs_printf() output limit to 16384 bytes.

3 years agoTypes: updates ts types.
Dmitry Volyntsev [Thu, 4 Aug 2022 03:26:24 +0000 (20:26 -0700)]
Types: updates ts types.

3 years agoModules: extending allowed context for js directives.
Dmitry Volyntsev [Wed, 3 Aug 2022 03:45:17 +0000 (20:45 -0700)]
Modules: extending allowed context for js directives.

HTTP: js_import, js_path, js_set and js_var are allowed in server and
location contexts. js_content, js_body_filter and js_header_filter
are allowed in 'if' context.
Stream: js_import, js_path, js_set and js_var are allowed in server context.

This closes #566 issue on Github.

3 years agoStream: fixed "js_fetch_timeout" introduced in b20de7bcee61 (0.7.4).
Dmitry Volyntsev [Wed, 3 Aug 2022 03:42:04 +0000 (20:42 -0700)]
Stream: fixed "js_fetch_timeout" introduced in b20de7bcee61 (0.7.4).

Previously, the value specified in js_fetch_timeout directive was
ignored for stream module.

3 years agoFixed deprecation warnings introduced in beaff2c39864.
Dmitry Volyntsev [Wed, 3 Aug 2022 03:40:20 +0000 (20:40 -0700)]
Fixed deprecation warnings introduced in beaff2c39864.

Previously, deprecated and non-deprecated properties shared
a common handler.

3 years agoAdded soft deprecation warning for deprecated methods and properties.
Dmitry Volyntsev [Tue, 26 Jul 2022 01:40:24 +0000 (18:40 -0700)]
Added soft deprecation warning for deprecated methods and properties.

3 years agoAdded generic logger callback.
Dmitry Volyntsev [Tue, 26 Jul 2022 01:40:24 +0000 (18:40 -0700)]
Added generic logger callback.

This allows for a host environment to control when and
how internal NJS messages are logged.

3 years agoFixed assignment to global property by name only.
Vadim Zhestikov [Fri, 22 Jul 2022 01:33:20 +0000 (18:33 -0700)]
Fixed assignment to global property by name only.

This closes #145 issue on Github.

3 years agoModules: fixed reading response body in fetch API.
Dmitry Volyntsev [Thu, 21 Jul 2022 00:49:00 +0000 (17:49 -0700)]
Modules: fixed reading response body in fetch API.

Previously, the response body was ignored if the Content-Length was
missing.

This closes #557 issue on Github.

3 years agoVersion bump.
Dmitry Volyntsev [Thu, 21 Jul 2022 02:56:42 +0000 (19:56 -0700)]
Version bump.

3 years agoAdded tag 0.7.6 for changeset 461dfb0bb60e
Dmitry Volyntsev [Tue, 19 Jul 2022 01:42:28 +0000 (18:42 -0700)]
Added tag 0.7.6 for changeset 461dfb0bb60e

3 years agoVersion 0.7.6. 0.7.6
Dmitry Volyntsev [Tue, 19 Jul 2022 00:58:41 +0000 (17:58 -0700)]
Version 0.7.6.

3 years agoFixed AST debug with tokens added with async/await feature (0.7.0).
Vadim Zhestikov [Fri, 15 Jul 2022 22:44:27 +0000 (15:44 -0700)]
Fixed AST debug with tokens added with async/await feature (0.7.0).

3 years agoFixed async function declaration in CLI.
Vadim Zhestikov [Fri, 15 Jul 2022 22:44:16 +0000 (15:44 -0700)]
Fixed async function declaration in CLI.

This closes #559 issue on Github.

3 years agoHTTP: refactored r.args object.
Dmitry Volyntsev [Fri, 15 Jul 2022 03:16:37 +0000 (20:16 -0700)]
HTTP: refactored r.args object.

1) added support for multiple arguments with the same key.
2) added cases sensitivity for keys.
3) keys and values are percent-decoded.

3 years agoAdded querystring API for modules.
Dmitry Volyntsev [Fri, 15 Jul 2022 03:16:36 +0000 (20:16 -0700)]
Added querystring API for modules.

3 years agoStyle: removed excessive empty line intoduced in 3acc8a1d9088.
Dmitry Volyntsev [Fri, 15 Jul 2022 03:16:34 +0000 (20:16 -0700)]
Style: removed excessive empty line intoduced in 3acc8a1d9088.

3 years agoAdded btoa() and atob() from WHATWG spec.
Dmitry Volyntsev [Tue, 12 Jul 2022 15:56:35 +0000 (08:56 -0700)]
Added btoa() and atob() from WHATWG spec.

The functions encode and decode to Base64 and from Base64.

3 years agoThrowing SyntaxError for octal escape sequences and \8 and \9.
Vadim Zhestikov [Mon, 11 Jul 2022 14:25:03 +0000 (07:25 -0700)]
Throwing SyntaxError for octal escape sequences and \8 and \9.

Error messages are same as messages generated by FireFox, because
they are looks more informative in comparison with messages
generated by chrome, nodejs, quickjs.

3 years agoHTTP: fixed r.headersOut setter for special headers.
Dmitry Volyntsev [Wed, 6 Jul 2022 23:52:50 +0000 (16:52 -0700)]
HTTP: fixed r.headersOut setter for special headers.

The issue was introduced in 5b7676ec600d (0.7.5) when njs module was
adapted to changes in nginx/1.23 related to header structures.

When special headers (Content-Length, Content-Type, Content-Encoding)
were set, the value of the last outgoing header might be overwritten
with a new set value.

This closes #555 issue on Github.

3 years agoEnsuring that double type is always evaluated at standard precision.
Dmitry Volyntsev [Wed, 6 Jul 2022 05:58:12 +0000 (22:58 -0700)]
Ensuring that double type is always evaluated at standard precision.

Previously, GCC on x86 uses extended precision for intermediate
calculations by default.  This might conflict with njs_diyfp_t because
GCC is not always rounds back the intermediate values to standard
precision.

The fix is to explicitly tell to a compiler to do so.

This closes #507 issue on Github.

3 years agoFixed break instruction in a try-catch block.
Dmitry Volyntsev [Wed, 29 Jun 2022 06:04:00 +0000 (23:04 -0700)]
Fixed break instruction in a try-catch block.

Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.

The fix is to update the JUMP offset appropriately.

This closes #553 issue on Github.

3 years agoCatching in runtime invalid JUMP offsets at FINALLY instruction.
Dmitry Volyntsev [Wed, 29 Jun 2022 05:36:38 +0000 (22:36 -0700)]
Catching in runtime invalid JUMP offsets at FINALLY instruction.

3 years agoAdded generator debug.
Dmitry Volyntsev [Wed, 29 Jun 2022 05:36:37 +0000 (22:36 -0700)]
Added generator debug.

3 years agoAdded native function symbolizer for function tracing in debug.
Dmitry Volyntsev [Wed, 29 Jun 2022 05:36:30 +0000 (22:36 -0700)]
Added native function symbolizer for function tracing in debug.

3 years agoFixed unicode argument trimming in parseInt().
Dmitry Volyntsev [Thu, 23 Jun 2022 06:37:27 +0000 (23:37 -0700)]
Fixed unicode argument trimming in parseInt().

3 years agoFixed large non-decimal literals.
Dmitry Volyntsev [Thu, 23 Jun 2022 06:37:16 +0000 (23:37 -0700)]
Fixed large non-decimal literals.

This closes #551 issue on Github.

3 years agoStream: throwing an exception when s.done() is used while filtering.
Dmitry Volyntsev [Thu, 23 Jun 2022 06:37:15 +0000 (23:37 -0700)]
Stream: throwing an exception when s.done() is used while filtering.

3 years agoAdded Symbol.for() and Symbol.keyfor().
Dmitry Volyntsev [Wed, 22 Jun 2022 04:54:14 +0000 (21:54 -0700)]
Added Symbol.for() and Symbol.keyfor().

3 years agoVersion bump.
Dmitry Volyntsev [Tue, 21 Jun 2022 22:29:00 +0000 (15:29 -0700)]
Version bump.

3 years agoAdded tag 0.7.5 for changeset 63c258c456ca
Dmitry Volyntsev [Tue, 21 Jun 2022 05:26:55 +0000 (22:26 -0700)]
Added tag 0.7.5 for changeset 63c258c456ca

3 years agoVersion 0.7.5. 0.7.5
Dmitry Volyntsev [Tue, 21 Jun 2022 04:38:49 +0000 (21:38 -0700)]
Version 0.7.5.

3 years agoFixed working with array-like object in Promise.all() and friends.
Dmitry Volyntsev [Fri, 17 Jun 2022 00:33:49 +0000 (17:33 -0700)]
Fixed working with array-like object in Promise.all() and friends.

Prevously, the code while iterating over an array-like object did not
take into account objects with absent elements.  As a result, the
resulting array object was returning with elements containing garbage
values.

The fix is to allocate and fill the resulting array object on the fly.

This closes #538 issue on Github.

3 years agoPropertly handling NJS_DECLINE in promise native functions.
Dmitry Volyntsev [Thu, 16 Jun 2022 00:10:39 +0000 (17:10 -0700)]
Propertly handling NJS_DECLINE in promise native functions.

Previously, NJS_DECLINE was returned from a Promise.all() and friends
when "resolve" property was not found in a promise constructor.
NJS_DECLINE was treated as NJS_ERROR in one place, but as NJS_OK in a
different place during the promise function evaluation.  As a result,
the VM was left in inconsistent state during stack unwinding which
resulted in a garbage return value.

The fix is to ensure that only NJS_ERROR or NJS_OK is returned
from ordinary native functions.

This closes #545 issue on Github.

3 years agoRenaming promise to promise_ctor to avoid confusion.
Dmitry Volyntsev [Wed, 15 Jun 2022 00:48:54 +0000 (17:48 -0700)]
Renaming promise to promise_ctor to avoid confusion.

3 years agoFixed njs_array_convert_to_slow_array().
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:49 +0000 (00:15 -0700)]
Fixed njs_array_convert_to_slow_array().

Previously, the function might free invalid pointer, as array->start is
not always points to the beginning of allocated memory block.

This closes #540 issue on Github.

3 years agoCatching invalid njs_mp_free() calls.
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:30 +0000 (00:15 -0700)]
Catching invalid njs_mp_free() calls.

3 years agoFixed memory freeing in njs_vm_compile().
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:29 +0000 (00:15 -0700)]
Fixed memory freeing in njs_vm_compile().

3 years agoRemoved njs_buffer_decode_destroy().
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:28 +0000 (00:15 -0700)]
Removed njs_buffer_decode_destroy().

3 years agoFixed njs_array_expand() for empty arrays.
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:28 +0000 (00:15 -0700)]
Fixed njs_array_expand() for empty arrays.

3 years agoFixed freeing of array created using njs_arr_create().
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:27 +0000 (00:15 -0700)]
Fixed freeing of array created using njs_arr_create().

3 years agoRemoved unused argument from njs_function_lambda_call().
Dmitry Volyntsev [Sat, 11 Jun 2022 07:15:20 +0000 (00:15 -0700)]
Removed unused argument from njs_function_lambda_call().

3 years agoFixed njs_iterator_to_array() with sparse arrays.
Dmitry Volyntsev [Thu, 9 Jun 2022 05:58:34 +0000 (22:58 -0700)]
Fixed njs_iterator_to_array() with sparse arrays.

This closes #524 issue on Github.

3 years agoFixed template literal from producing byte-strings.
Dmitry Volyntsev [Thu, 9 Jun 2022 04:06:16 +0000 (21:06 -0700)]
Fixed template literal from producing byte-strings.

Previously, as a side effect of creating a key for the values hash a
byte-string was created.  This byte-string was reused internally and
might appear in template literal.  As a result a byte-string was
produced as a value for a template literal.  Byte-strings are obsolete
and are scheduled for removal because they can cause issues with
internal routines not prepared for them.

3 years agoHTTP: returing undefined for Content-Type when the header is absent.
Dmitry Volyntsev [Wed, 8 Jun 2022 04:30:57 +0000 (21:30 -0700)]
HTTP: returing undefined for Content-Type when the header is absent.

This unifies empty response value type for r.headersOut.

3 years agoHTTP: fixed r.headersOut special getters when value is absent.
Dmitry Volyntsev [Tue, 7 Jun 2022 06:27:11 +0000 (23:27 -0700)]
HTTP: fixed r.headersOut special getters when value is absent.

Previously, when Content-Encoding or Content-Length header was absent,
an exception was thrown erroneously.

This closes #537 issue on Github.

3 years agoFixed String.prototype.replace() with byte strings.
Dmitry Volyntsev [Sat, 4 Jun 2022 06:24:12 +0000 (23:24 -0700)]
Fixed String.prototype.replace() with byte strings.

This closes #522 issue on Github.

3 years agoIntroduced njs_is_byte_or_ascii_string().
Dmitry Volyntsev [Sat, 4 Jun 2022 06:24:11 +0000 (23:24 -0700)]
Introduced njs_is_byte_or_ascii_string().

3 years agoImproved OPCODE debug by tracing native functions.
Dmitry Volyntsev [Sat, 4 Jun 2022 06:24:10 +0000 (23:24 -0700)]
Improved OPCODE debug by tracing native functions.

3 years agoFixed typed-array ctor when source array is changed while iterating.
Dmitry Volyntsev [Sat, 4 Jun 2022 06:24:08 +0000 (23:24 -0700)]
Fixed typed-array ctor when source array is changed while iterating.

Previously, the function used optimization for ordinary arrays with no
gaps (so called fast arrays).  For a fast array code took elements
directly from internal flat C array. The direct pointer may become
invalid as side-effect of custom valueOf() method for an element.

The fix is to eliminate the micro-optimization which uses direct
pointers.

The problem is similar to the 9578cc729205 (0.7.2) commit.

This closes #523 issue on Github.

3 years agoFixed njs_vmcode_interpreter() when await fails.
Dmitry Volyntsev [Thu, 2 Jun 2022 23:32:38 +0000 (16:32 -0700)]
Fixed njs_vmcode_interpreter() when await fails.

Previously, while interpreting a user function, njs_vmcode_interpreter()
might return prematurely when an error happens in await instruction.
This is not correct because the current frame has to be unwound (or
exception caught) first.

The fix is to exit through only 5 appropriate exit points to ensure
proper unwinding.

The patch correctly fixes issue reported in 07ef6c1f04f1 (0.7.3).

This closes #506 issue on Github.

3 years agoFixed function value initialization.
Dmitry Volyntsev [Thu, 2 Jun 2022 04:54:32 +0000 (21:54 -0700)]
Fixed function value initialization.

This closes #470 issue on Github.

3 years agoFixed catching of the exception thrown from an awaited function.
Dmitry Volyntsev [Wed, 1 Jun 2022 04:48:46 +0000 (21:48 -0700)]
Fixed catching of the exception thrown from an awaited function.

This closes #500 issue on Github.

3 years agoImproved OPCODE debug.
Dmitry Volyntsev [Wed, 1 Jun 2022 04:48:26 +0000 (21:48 -0700)]
Improved OPCODE debug.

3 years agoFixed typo in debug code introduced in 3e754413e907 (0.7.4).
Dmitry Volyntsev [Wed, 1 Jun 2022 04:48:19 +0000 (21:48 -0700)]
Fixed typo in debug code introduced in 3e754413e907 (0.7.4).

3 years agoHTTP: adapting to changes in nginx header structures.
Dmitry Volyntsev [Tue, 31 May 2022 16:26:47 +0000 (09:26 -0700)]
HTTP: adapting to changes in nginx header structures.

3 years agoHTTP: improved memory allocation error handling.
Sergey Kandaurov [Thu, 26 May 2022 11:28:06 +0000 (15:28 +0400)]
HTTP: improved memory allocation error handling.

3 years agoVersion bump.
Dmitry Volyntsev [Tue, 31 May 2022 15:53:18 +0000 (08:53 -0700)]
Version bump.

3 years agoAdded tag 0.7.4 for changeset b5198f7f11a3
Dmitry Volyntsev [Tue, 24 May 2022 16:10:52 +0000 (09:10 -0700)]
Added tag 0.7.4 for changeset b5198f7f11a3

3 years agoVersion 0.7.4. 0.7.4
Dmitry Volyntsev [Tue, 24 May 2022 16:07:58 +0000 (09:07 -0700)]
Version 0.7.4.

3 years agoTests: adapted WebCrypto tests to RHEL9.
Dmitry Volyntsev [Tue, 24 May 2022 05:26:51 +0000 (22:26 -0700)]
Tests: adapted WebCrypto tests to RHEL9.

3 years agoFixed use-of-uninitialized-value introduced in beb180165976.
Dmitry Volyntsev [Tue, 24 May 2022 05:26:50 +0000 (22:26 -0700)]
Fixed use-of-uninitialized-value introduced in beb180165976.

Found by Memory Sanitizer.

3 years agoFixed Object.prototype.constructor property handler with large heap.
Dmitry Volyntsev [Tue, 24 May 2022 05:26:35 +0000 (22:26 -0700)]
Fixed Object.prototype.constructor property handler with large heap.

Found by Memory Sanitizer.

3 years agoFixed redefinition of special props in Object.defineProperty().
Dmitry Volyntsev [Thu, 19 May 2022 23:41:08 +0000 (16:41 -0700)]
Fixed redefinition of special props in Object.defineProperty().

Previously, when NJS_PROPERTY_HANDLER property was updated it might be
left in inconsistent state.  Namely, prop->type was left unchanged, but
prop->value did not have an expected property handler.  As a result
consecutive reference to the property may result in a segment violation.

The fix is to update the prop->type during redefinition.

This closes #504 issue on Github.

3 years agoGetting rid of excessive NJS_LEVEL_TEMP.
Dmitry Volyntsev [Wed, 18 May 2022 07:01:05 +0000 (00:01 -0700)]
Getting rid of excessive NJS_LEVEL_TEMP.

3 years agoAdded generator debug.
Dmitry Volyntsev [Wed, 18 May 2022 06:26:09 +0000 (23:26 -0700)]
Added generator debug.

3 years agoImproved OPCODE debug.
Dmitry Volyntsev [Wed, 18 May 2022 06:26:05 +0000 (23:26 -0700)]
Improved OPCODE debug.

3 years agoFixed compatibility with BoringSSL.
Dmitry Volyntsev [Tue, 17 May 2022 05:57:27 +0000 (22:57 -0700)]
Fixed compatibility with BoringSSL.

The fix is to use more conventional API when dealing with HMAC
algorithm.

This closes #455 issue on Github.

4 years agoMaking function expression binding immutable according the specs.
Dmitry Volyntsev [Thu, 12 May 2022 04:08:21 +0000 (21:08 -0700)]
Making function expression binding immutable according the specs.

This closes #56 issue on Github.

4 years agoLeaving consistency checks as asserts for njs_scope_index().
Dmitry Volyntsev [Thu, 12 May 2022 00:51:17 +0000 (17:51 -0700)]
Leaving consistency checks as asserts for njs_scope_index().

4 years agoFixed ellipsis support.
Dmitry Volyntsev [Wed, 11 May 2022 23:33:46 +0000 (16:33 -0700)]
Fixed ellipsis support.

As of now, ellispis syntax is supported for function declaration with
the rest arguments.

This closes #365 issue on Github.