]> git.kaiwu.me - njs.git/log
njs.git
4 years agoFixed %TypedArray%.prototype.join() with detached buffer.
Dmitry Volyntsev [Tue, 31 Aug 2021 13:16:44 +0000 (13:16 +0000)]
Fixed %TypedArray%.prototype.join() with detached buffer.

The TypedArray buffer may be detached while evaluating custom
"separator" argument.  The fix is to move the buffer check below this
point.

Found by Official ECMAScript Conformance Test Suite.

4 years agoMemory: added cleanup handlers support.
Dmitry Volyntsev [Tue, 31 Aug 2021 13:16:43 +0000 (13:16 +0000)]
Memory: added cleanup handlers support.

4 years agoAllowing to pass arbitrary pointer to object iterator handler.
Dmitry Volyntsev [Tue, 31 Aug 2021 13:16:42 +0000 (13:16 +0000)]
Allowing to pass arbitrary pointer to object iterator handler.

4 years agoShell: fixed memory leak in script options.
Dmitry Volyntsev [Tue, 31 Aug 2021 13:16:42 +0000 (13:16 +0000)]
Shell: fixed memory leak in script options.

4 years agoFixed backtrace output for arrays broken in b0177571ce1d.
Dmitry Volyntsev [Tue, 31 Aug 2021 13:16:32 +0000 (13:16 +0000)]
Fixed backtrace output for arrays broken in b0177571ce1d.

After the previous commit the array prototype methods were not found
during njs_object_traverse() invocation. As the result the exceptions in
Array.prototype methods were reported with a backtrace containing "native
(native)" instead of a proper function name.

4 years agoRefactored njs_object_traverse().
Dmitry Volyntsev [Thu, 19 Aug 2021 16:17:19 +0000 (16:17 +0000)]
Refactored njs_object_traverse().

The previous approach was inconsistent in treating shared properties
with other places (JSON.stringify()) where object is iterated.

4 years agoAllowing to create external objects with NULL external pointer.
Dmitry Volyntsev [Fri, 13 Aug 2021 12:20:46 +0000 (12:20 +0000)]
Allowing to create external objects with NULL external pointer.

4 years agoStream: fixed CPU hog when js_filter is registered in both directions.
Miao Wang [Wed, 11 Aug 2021 03:44:12 +0000 (11:44 +0800)]
Stream: fixed CPU hog when js_filter is registered in both directions.

Previously, a single busy chain was used to track filtered data in both
directions.  This might lead to a situation when busy chunks are not
freed properly and pile up.

The fix is to separate busy chain for upstream and downstream directions.

This closes #413 issue on Github.

4 years agoAdded remaining Promise constructor methods.
Alexander Borisov [Wed, 11 Aug 2021 18:48:52 +0000 (21:48 +0300)]
Added remaining Promise constructor methods.

The following methods were added: Promise.all(), Promise.allSettled(),
Promise.any(), Promise.race().

4 years agoFixed resolve/reject callback for Promise.prototype.finally().
Alexander Borisov [Wed, 11 Aug 2021 18:48:51 +0000 (21:48 +0300)]
Fixed resolve/reject callback for Promise.prototype.finally().

4 years agoIntroduced AggregateError implementation.
Alexander Borisov [Wed, 11 Aug 2021 18:48:51 +0000 (21:48 +0300)]
Introduced AggregateError implementation.

4 years agoMoving generic iterator code to a proper location.
Alexander Borisov [Wed, 11 Aug 2021 18:48:50 +0000 (21:48 +0300)]
Moving generic iterator code to a proper location.

4 years agoThe maximum depth of nested functions is set to 128.
Alexander Borisov [Thu, 15 Jul 2021 17:32:44 +0000 (20:32 +0300)]
The maximum depth of nested functions is set to 128.

4 years agoRemoved recursion from finding let closures.
Alexander Borisov [Thu, 15 Jul 2021 17:32:43 +0000 (20:32 +0300)]
Removed recursion from finding let closures.

4 years agoRemoved recursion from code generator.
Alexander Borisov [Thu, 15 Jul 2021 17:32:40 +0000 (20:32 +0300)]
Removed recursion from code generator.

4 years agoAdded generic AST traverser.
Dmitry Volyntsev [Thu, 15 Jul 2021 14:51:57 +0000 (14:51 +0000)]
Added generic AST traverser.

4 years agoFile flags table cleanup.
Dmitry Volyntsev [Wed, 14 Jul 2021 13:18:56 +0000 (13:18 +0000)]
File flags table cleanup.

4 years agoAdded support for ArrayBuffer in njs_vm_value_to_bytes().
Dmitry Volyntsev [Tue, 13 Jul 2021 15:22:24 +0000 (15:22 +0000)]
Added support for ArrayBuffer in njs_vm_value_to_bytes().

4 years agoAdded fs flags missed in 5c6aa60224cb (0.1.15).
hyeonisism [Tue, 13 Jul 2021 01:23:23 +0000 (10:23 +0900)]
Added fs flags missed in 5c6aa60224cb (0.1.15).

This closes #405 issue on Github.

4 years agoMarking different external pointer with unique tag.
Dmitry Volyntsev [Fri, 9 Jul 2021 19:14:23 +0000 (19:14 +0000)]
Marking different external pointer with unique tag.

An external value has an arbitrary raw pointer associated with it.
External values with different prototypes have different C-level
structures.  To ensure that only appropriate structures are fetched
by njs_vm_external() the unique tag has to be provided during
creation of external values.

4 years agoModules: improved working with external prototypes.
Dmitry Volyntsev [Fri, 9 Jul 2021 14:01:26 +0000 (14:01 +0000)]
Modules: improved working with external prototypes.

This patch avoids relying on the order in which external prototypes are
registered.  Instead, the returned proto_id is expected to be stored
somewhere.

4 years agoUnicode case tables updated to version 14.0.0 (May 2021).
Valentin Bartenev [Fri, 9 Jul 2021 09:03:11 +0000 (12:03 +0300)]
Unicode case tables updated to version 14.0.0 (May 2021).

4 years agoFixed rest parameter parsing without binding identifier.
Alexander Borisov [Tue, 29 Jun 2021 14:08:23 +0000 (17:08 +0300)]
Fixed rest parameter parsing without binding identifier.

This closes #400 issue on GitHub.

4 years agoVersion bump.
Alexander Borisov [Tue, 29 Jun 2021 14:08:21 +0000 (17:08 +0300)]
Version bump.

4 years agoAdded tag 0.6.1 for changeset 4adbe67b292a
Dmitry Volyntsev [Tue, 29 Jun 2021 12:12:57 +0000 (12:12 +0000)]
Added tag 0.6.1 for changeset 4adbe67b292a

4 years agoVersion 0.6.1. 0.6.1
Dmitry Volyntsev [Tue, 29 Jun 2021 11:47:04 +0000 (11:47 +0000)]
Version 0.6.1.

4 years agoFixed parsing of export default declarations.
Artem S. Povalyukhin [Thu, 24 Jun 2021 05:53:12 +0000 (08:53 +0300)]
Fixed parsing of export default declarations.

With non-assignment expression.

4 years agoFixed RegExpBuiltinExec() with UTF-8 only regexps.
Dmitry Volyntsev [Fri, 25 Jun 2021 17:00:12 +0000 (17:00 +0000)]
Fixed RegExpBuiltinExec() with UTF-8 only regexps.

The original issue was introduced in f9082cd59ba6 (0.4.2) while adding
RegExpBuiltinExec(), but after de64420d0f2b (0.6.0) it started to affect
RegExp.prototype.test() as it was rewritten according to spec.

4 years agoIntroduced "debugger" token support.
Dmitry Volyntsev [Fri, 18 Jun 2021 15:01:48 +0000 (15:01 +0000)]
Introduced "debugger" token support.

4 years agoFixed printing AST with recently added tokens.
Dmitry Volyntsev [Fri, 18 Jun 2021 15:01:13 +0000 (15:01 +0000)]
Fixed printing AST with recently added tokens.

4 years agoPrinting AST before trying to generate code.
Dmitry Volyntsev [Fri, 18 Jun 2021 15:01:12 +0000 (15:01 +0000)]
Printing AST before trying to generate code.

4 years agoVersion bump.
Dmitry Volyntsev [Fri, 18 Jun 2021 15:00:32 +0000 (15:00 +0000)]
Version bump.

4 years agoAdded tag 0.6.0 for changeset 742ebceef2b5
Dmitry Volyntsev [Tue, 15 Jun 2021 12:53:09 +0000 (12:53 +0000)]
Added tag 0.6.0 for changeset 742ebceef2b5

4 years agoVersion 0.6.0. 0.6.0
Dmitry Volyntsev [Tue, 15 Jun 2021 12:05:34 +0000 (12:05 +0000)]
Version 0.6.0.

4 years agoAdded forgotten paragraph section for 0.5.2.
Dmitry Volyntsev [Tue, 15 Jun 2021 11:54:03 +0000 (11:54 +0000)]
Added forgotten paragraph section for 0.5.2.

4 years agoFixed use-of-uninitialized-value in njs_string_index().
Dmitry Volyntsev [Fri, 11 Jun 2021 18:28:21 +0000 (18:28 +0000)]
Fixed use-of-uninitialized-value in njs_string_index().

Found by MemorySanitizer.

4 years agoFixed RegExp.prototype.[@@split]() with UTF8 strings.
Dmitry Volyntsev [Fri, 11 Jun 2021 15:47:37 +0000 (15:47 +0000)]
Fixed RegExp.prototype.[@@split]() with UTF8 strings.

Found by OSS-Fuzz.

4 years agoFixed dumping of objects with circular references.
Dmitry Volyntsev [Fri, 11 Jun 2021 15:15:48 +0000 (15:15 +0000)]
Fixed dumping of objects with circular references.

This closes #395 issue on Github.

4 years agoFixed String.prototype.split() according to the specification.
Dmitry Volyntsev [Wed, 9 Jun 2021 17:14:10 +0000 (17:14 +0000)]
Fixed String.prototype.split() according to the specification.

This closes #359 issue on GitHub.

4 years agoAdded benchmarks for String.prototype.split().
Dmitry Volyntsev [Tue, 8 Jun 2021 18:01:25 +0000 (18:01 +0000)]
Added benchmarks for String.prototype.split().

4 years agoIntroduced RegExp.prototype.sticky support.
Dmitry Volyntsev [Sat, 5 Jun 2021 11:55:08 +0000 (11:55 +0000)]
Introduced RegExp.prototype.sticky support.

4 years agoFixed use-of-uninitialized-value while tracking rejected promises.
Dmitry Volyntsev [Tue, 8 Jun 2021 12:43:13 +0000 (12:43 +0000)]
Fixed use-of-uninitialized-value while tracking rejected promises.

Found by Found by MemorySanitizer.

4 years agoAccessing "lastIndex" property according to the spec.
Dmitry Volyntsev [Sat, 5 Jun 2021 11:55:08 +0000 (11:55 +0000)]
Accessing "lastIndex" property according to the spec.

4 years agoFixed RegExp.prototype.test() according to the specification.
Dmitry Volyntsev [Sat, 5 Jun 2021 11:55:08 +0000 (11:55 +0000)]
Fixed RegExp.prototype.test() according to the specification.

4 years agoImplemented RegExp getters according to the specification.
Dmitry Volyntsev [Sat, 5 Jun 2021 11:58:00 +0000 (11:58 +0000)]
Implemented RegExp getters according to the specification.

4 years agoImproved arguments parsing in Date constructor.
Dmitry Volyntsev [Wed, 2 Jun 2021 14:10:03 +0000 (14:10 +0000)]
Improved arguments parsing in Date constructor.

4 years agoFixed integer-overflow in MakeDay().
Dmitry Volyntsev [Wed, 2 Jun 2021 13:25:32 +0000 (13:25 +0000)]
Fixed integer-overflow in MakeDay().

Found by OSS-Fuzz.

4 years agoFixed misaligned reading and writing.
Dmitry Volyntsev [Mon, 31 May 2021 06:55:34 +0000 (06:55 +0000)]
Fixed misaligned reading and writing.

error: load of misaligned address 0x62500de0ab11 for type 'uint16_t',
    which requires 2 byte alignment.

Found by UndefinedBehaviorSanitizer.

4 years agoRemoving the requirement of "aligned" attribute support.
Dmitry Volyntsev [Mon, 31 May 2021 06:55:32 +0000 (06:55 +0000)]
Removing the requirement of "aligned" attribute support.

Before 0a2a0b5a74f4, the address of values used in runtime had to be the
multiple of 16, because the address of a variable was used as its VM
index. The first 4 bits of an index signified the scope of a varible.

This is no longer the case, after 0a2a0b5a74f4 the address of a variable
is never used as its VM index.

4 years agoStyle.
Dmitry Volyntsev [Fri, 28 May 2021 15:23:03 +0000 (15:23 +0000)]
Style.

4 years agoFixed heap-buffer-overflow in String.prototype.lastIndexOf().
Dmitry Volyntsev [Fri, 28 May 2021 14:00:04 +0000 (14:00 +0000)]
Fixed heap-buffer-overflow in String.prototype.lastIndexOf().

Previously, the issue occurred when the searchValue is shorter
in character length than "this" string, but longer in byte length.

4 years agoFixed ToInt32() with values >= 2**(53+30).
Dmitry Volyntsev [Mon, 24 May 2021 14:18:15 +0000 (14:18 +0000)]
Fixed ToInt32() with values >= 2**(53+30).

4 years agoFixed integer-overflow in ToInt32().
Dmitry Volyntsev [Mon, 24 May 2021 14:17:59 +0000 (14:17 +0000)]
Fixed integer-overflow in ToInt32().

error: negation of -2147483648 cannot be represented in type 'int32_t'.

Found by OSS-Fuzz.

4 years agoFixed implicit long to double conversion warning.
Dmitry Volyntsev [Mon, 24 May 2021 12:33:43 +0000 (12:33 +0000)]
Fixed implicit long to double conversion warning.

error: implicit conversion from 'long' to 'double' changes value from
    9223372036854775807 to 9223372036854775808.

4 years agoSuppressed spurious compilation warning with gcc-7 and older.
Dmitry Volyntsev [Mon, 24 May 2021 12:33:36 +0000 (12:33 +0000)]
Suppressed spurious compilation warning with gcc-7 and older.

src/njs_regexp.c:1335:19: error: ‘pos’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
    pos = njs_string_offset(s.start, s.start + s.size, pos) - s.start;

4 years agoSimplified String.prototype.repeat() to match the spec.
Dmitry Volyntsev [Mon, 24 May 2021 10:51:48 +0000 (10:51 +0000)]
Simplified String.prototype.repeat() to match the spec.

4 years agoFixed undefined behaviour in njs_number_to_integer().
Dmitry Volyntsev [Mon, 24 May 2021 10:51:47 +0000 (10:51 +0000)]
Fixed undefined behaviour in njs_number_to_integer().

C11: 6.3.1.4
... If the value of the integral part cannot be represented by the
integer type, the behavior is undefined.

Found by OSS-Fuzz.

4 years agoFixed parsing case/default in an unclosed function block in switch.
Alexander Borisov [Mon, 17 May 2021 17:35:35 +0000 (20:35 +0300)]
Fixed parsing case/default in an unclosed function block in switch.

5 years agoRemoved check variable type for CLI completions.
Alexander Borisov [Thu, 6 May 2021 13:07:09 +0000 (16:07 +0300)]
Removed check variable type for CLI completions.

Found by Coverity (CID 1478003).

5 years agoRemoved unnecessary NULL checks introduced in 0a2a0b5a74f4.
Alexander Borisov [Thu, 6 May 2021 13:07:08 +0000 (16:07 +0300)]
Removed unnecessary NULL checks introduced in 0a2a0b5a74f4.

Found by Coverity (CID 1478004).

5 years agoRemoved unnecessary NULL checks introduced in 0a2a0b5a74f4.
Alexander Borisov [Thu, 6 May 2021 13:07:06 +0000 (16:07 +0300)]
Removed unnecessary NULL checks introduced in 0a2a0b5a74f4.

Found by Coverity (CID 1478008).

5 years agoFixed typo introduced in 27a4a52621d5 and f58a06be33dc.
Alexander Borisov [Thu, 6 May 2021 13:07:05 +0000 (16:07 +0300)]
Fixed typo introduced in 27a4a52621d5 and f58a06be33dc.

5 years agoIntroduced const implementation.
Alexander Borisov [Fri, 30 Apr 2021 13:02:34 +0000 (16:02 +0300)]
Introduced const implementation.

5 years agoIntroduced let implementation.
Alexander Borisov [Fri, 30 Apr 2021 13:02:28 +0000 (16:02 +0300)]
Introduced let implementation.

This closes #105 issue on GitHub.

5 years agoIntroduced reserved words in strict mode.
Alexander Borisov [Fri, 30 Apr 2021 13:02:20 +0000 (16:02 +0300)]
Introduced reserved words in strict mode.

5 years agoScopes refactoring.
Alexander Borisov [Fri, 30 Apr 2021 13:02:08 +0000 (16:02 +0300)]
Scopes refactoring.

5 years agoIntroduced "undefined" as a token in lexer.
Dmitry Volyntsev [Fri, 16 Apr 2021 15:25:22 +0000 (15:25 +0000)]
Introduced "undefined" as a token in lexer.

5 years agoAdded function micro benchmarks.
Dmitry Volyntsev [Fri, 30 Apr 2021 10:10:57 +0000 (10:10 +0000)]
Added function micro benchmarks.

5 years agoFixed expect tests.
Dmitry Volyntsev [Fri, 16 Apr 2021 13:46:46 +0000 (13:46 +0000)]
Fixed expect tests.

5 years agoVersion bump.
Dmitry Volyntsev [Fri, 16 Apr 2021 13:35:20 +0000 (13:35 +0000)]
Version bump.

5 years agoAdded tag 0.5.3 for changeset 282b9412976c
Dmitry Volyntsev [Tue, 30 Mar 2021 13:58:27 +0000 (13:58 +0000)]
Added tag 0.5.3 for changeset 282b9412976c

5 years agoVersion 0.5.3. 0.5.3
Dmitry Volyntsev [Tue, 30 Mar 2021 13:57:17 +0000 (13:57 +0000)]
Version 0.5.3.

5 years agoModules: added js_var directive.
Dmitry Volyntsev [Sat, 27 Mar 2021 16:21:21 +0000 (16:21 +0000)]
Modules: added js_var directive.

5 years agoVersion bump.
Dmitry Volyntsev [Sat, 27 Mar 2021 16:45:52 +0000 (16:45 +0000)]
Version bump.

5 years agoAdded tag 0.5.2 for changeset e5de01378b1a
Dmitry Volyntsev [Tue, 9 Mar 2021 13:28:31 +0000 (13:28 +0000)]
Added tag 0.5.2 for changeset e5de01378b1a

5 years agoVersion 0.5.2. 0.5.2
Dmitry Volyntsev [Tue, 9 Mar 2021 13:24:51 +0000 (13:24 +0000)]
Version 0.5.2.

5 years agoTypes: updated TS definitions.
Dmitry Volyntsev [Tue, 9 Mar 2021 13:24:06 +0000 (13:24 +0000)]
Types: updated TS definitions.

5 years agoIntroduced njs.on('exit') callback support.
Dmitry Volyntsev [Sat, 6 Mar 2021 12:42:30 +0000 (12:42 +0000)]
Introduced njs.on('exit') callback support.

5 years agoAdded missing njs_vm_destroy() calls in CLI.
Dmitry Volyntsev [Wed, 3 Mar 2021 18:28:00 +0000 (18:28 +0000)]
Added missing njs_vm_destroy() calls in CLI.

5 years agoStream: introduced "stream" property.
Dmitry Volyntsev [Fri, 26 Feb 2021 17:45:56 +0000 (17:45 +0000)]
Stream: introduced "stream" property.

Is an alias to $status variable.

5 years agoStream: simplified session cleanup.
Dmitry Volyntsev [Mon, 1 Mar 2021 17:15:44 +0000 (17:15 +0000)]
Stream: simplified session cleanup.

5 years agoFixed for-in iteration of typed array values.
Artem S. Povalyukhin [Thu, 25 Feb 2021 07:06:18 +0000 (10:06 +0300)]
Fixed for-in iteration of typed array values.

5 years agoFixed compilation error with gcc-11.
Dmitry Volyntsev [Wed, 24 Feb 2021 16:57:05 +0000 (16:57 +0000)]
Fixed compilation error with gcc-11.

This closes #376 issue on Github.

5 years agoEliminating vm->main_index introduced in ea2ec4c3ed7d.
Dmitry Volyntsev [Wed, 24 Feb 2021 14:50:14 +0000 (14:50 +0000)]
Eliminating vm->main_index introduced in ea2ec4c3ed7d.

The vm->main_index was only needed for the disassembler in the
accumulative mode.  It was used to prevent from disassembling the code
from the previous iterations in the CLI.

The same result can be achieved without introducing the VM level field.

5 years agoDecoupling parser structure from the main VM structure.
Dmitry Volyntsev [Wed, 24 Feb 2021 14:48:20 +0000 (14:48 +0000)]
Decoupling parser structure from the main VM structure.

vm->parser is only needed during parsing phase, so it can be eliminated.
This improves dependencies tracking and readability.

As a side effect it fixes #372 issue on Github: previously, Function
constructor left VM context in inconsistent state if compilation failed.
The direct root cause was that a function object was created, but
because Function constructor ended prematurely the object was not fully
initialized. This is not a problem by itself because usually this
partially created object cannot be referenced. In the accumulative mode,
which is only enabled in CLI, vm->parser was used to store the references
to the variables from the previous iteration.

5 years agoFixed Object.freeze() and friends according to the specification.
Artem S. Povalyukhin [Fri, 19 Feb 2021 17:27:44 +0000 (17:27 +0000)]
Fixed Object.freeze() and friends according to the specification.

This fixes #340 and also closes #374 issues on Github.

5 years agoFixed property descriptor reuse for not extensible objects.
Artem S. Povalyukhin [Wed, 17 Feb 2021 13:05:28 +0000 (16:05 +0300)]
Fixed property descriptor reuse for not extensible objects.

This closes #375 issue on Github.

5 years agoHTTP: added js body filter.
Dmitry Volyntsev [Thu, 18 Feb 2021 19:51:10 +0000 (19:51 +0000)]
HTTP: added js body filter.

5 years agoVersion bump.
Dmitry Volyntsev [Tue, 16 Feb 2021 13:32:22 +0000 (13:32 +0000)]
Version bump.

5 years agoAdded tag 0.5.1 for changeset d355071f55ef
Dmitry Volyntsev [Tue, 16 Feb 2021 13:25:46 +0000 (13:25 +0000)]
Added tag 0.5.1 for changeset d355071f55ef

5 years agoVersion 0.5.1. 0.5.1
Dmitry Volyntsev [Tue, 16 Feb 2021 13:24:47 +0000 (13:24 +0000)]
Version 0.5.1.

5 years agoFixed Date.prototype.toISOString() with invalid date values.
Dmitry Volyntsev [Mon, 15 Feb 2021 15:25:00 +0000 (15:25 +0000)]
Fixed Date.prototype.toISOString() with invalid date values.

This fixes #373 issue on Github.

5 years agoTypes: added definitions for fetch method.
Dmitry Volyntsev [Thu, 11 Feb 2021 14:39:13 +0000 (14:39 +0000)]
Types: added definitions for fetch method.

5 years agoAllowing to pass arbitrary number of arguments in ngx_js_call().
Dmitry Volyntsev [Thu, 11 Feb 2021 14:30:59 +0000 (14:30 +0000)]
Allowing to pass arbitrary number of arguments in ngx_js_call().

5 years agoStream: fixed processing buffered data in body filter.
Dmitry Volyntsev [Wed, 10 Feb 2021 14:03:11 +0000 (14:03 +0000)]
Stream: fixed processing buffered data in body filter.

Previously, when data was proxied to upstream, it may be partially
written and is left in upstream connection buffer.  Later, when
writing becomes possible again, the body filter is called but it
fails to call the next filter in the chain. This resulted in hanging
connection.

The fix is to take the buffered data in upstream connection into account.

This fixes #368 issue on Github.

5 years agoFixed safe mode bypass in Function constructor.
Dmitry Volyntsev [Mon, 1 Feb 2021 01:16:51 +0000 (02:16 +0100)]
Fixed safe mode bypass in Function constructor.

This closes #367 pull request on Github.

Thanks bux.patryk@gmail.com for prodding it.

5 years agoHTTP: fixed module type introduced in c0c6539ae445.
Dmitry Volyntsev [Mon, 1 Feb 2021 16:13:10 +0000 (16:13 +0000)]
HTTP: fixed module type introduced in c0c6539ae445.

5 years agoHTTP: added js header filter.
Dmitry Volyntsev [Mon, 1 Feb 2021 12:24:17 +0000 (12:24 +0000)]
HTTP: added js header filter.

5 years agoFixed Headers object keys forgotten in 81040de6b085.
Dmitry Volyntsev [Tue, 26 Jan 2021 12:52:17 +0000 (12:52 +0000)]
Fixed Headers object keys forgotten in 81040de6b085.

Found by Coverity (CID 1472501).

5 years agoFixed allocation failure detection in njs_backtrace_to_string().
Dmitry Volyntsev [Tue, 26 Jan 2021 12:52:15 +0000 (12:52 +0000)]
Fixed allocation failure detection in njs_backtrace_to_string().

Found by Coverity (CID 1472503).