Welcome! Log In Create A New Profile

Advanced

[njs] Avoiding modification of vm->retval in njs_promise_alloc().

Dmitry Volyntsev
December 16, 2020 03:30PM
details: https://hg.nginx.org/njs/rev/1f862b9dec16
branches:
changeset: 1582:1f862b9dec16
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed Dec 16 20:27:31 2020 +0000
description:
Avoiding modification of vm->retval in njs_promise_alloc().

Alloc functions are not expected to modify existing values.

diffstat:

src/njs_promise.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diffs (11 lines):

diff -r 4f5feafc1afc -r 1f862b9dec16 src/njs_promise.c
--- a/src/njs_promise.c Wed Dec 16 20:27:27 2020 +0000
+++ b/src/njs_promise.c Wed Dec 16 20:27:31 2020 +0000
@@ -107,7 +107,6 @@ njs_promise_alloc(njs_vm_t *vm)
njs_queue_init(&data->fulfill_queue);
njs_queue_init(&data->reject_queue);

- njs_set_promise(&vm->retval, promise);
njs_set_data(&promise->value, data, 0);

return promise;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Avoiding modification of vm->retval in njs_promise_alloc().

Dmitry Volyntsev 80 December 16, 2020 03:30PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready