Skip to content

Instantly share code, notes, and snippets.

View lexborisov's full-sized avatar

Alexander lexborisov

View GitHub Profile
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1606323195 -10800
# Wed Nov 25 19:53:15 2020 +0300
# Node ID e6e56372ad73c714bc02b1688fd6f18fb697ad2d
# Parent 434f20c29f4c71982368b16a98f52e91d2526497
Added resolving post events for nginx.
diff -r 434f20c29f4c -r e6e56372ad73 nginx/ngx_js.c
--- a/nginx/ngx_js.c Wed Nov 25 10:47:47 2020 +0000
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1604406701 -10800
# Tue Nov 03 15:31:41 2020 +0300
# Node ID d2e3749538b55a28db6ec9fba5c83cd8a74f0218
# Parent c791e3943df1974a300e5f112d0108004b1835c6
Promise: tracking unhandled promise rejection.
By default, promises should finish processing normally for .then(),
.catch(), .finally() and so on. The patch adds the ability to track
lxb_inline lxb_status_t
serializer_callback(const lxb_char_t *data, size_t len, void *ctx)
{
printf("%.*s", (int) len, (const char *) data);
return LXB_STATUS_OK;
}
lxb_inline void
serialize_node(lxb_dom_node_t *node)
#include <lexbor/html/html.h>
#include <lexbor/core/fs.h>
#define FAILED(...) \
do { \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
exit(EXIT_FAILURE); \
size_t len;
lxb_char_t *text;
text = lxb_dom_node_text_content(lxb_dom_interface_node(document), &len);
/* use text */
lxb_dom_document_destroy_text(document, text);
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1575643153 -10800
# Fri Dec 06 17:39:13 2019 +0300
# Node ID adf24ac3d53087e6590055c81ab3395e54066f46
# Parent 242395b814bbfadbf957ccb18037f28628ce3bf0
Introduced the Promise object.
The current implementation without three methods: all, allSettled, race.
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1575386163 -10800
# Tue Dec 03 18:16:03 2019 +0300
# Node ID eeed4c5ffca03e1749cfe60e5d4af6cb4259c5ac
# Parent ef64784b77f667f9c16905dc50fb62203390c32f
Introduced the Promise object.
The current implementation without three methods: all, allSettled, race.
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1575041240 -10800
# Fri Nov 29 18:27:20 2019 +0300
# Node ID ef2e7a062ba40ff0f0e307763ec4e602dbf57112
# Parent 01c7375c9b5ca47e0eda9a7bddf6aacbefbebaff
[mq]: Great_Promise
diff -r 01c7375c9b5c -r ef2e7a062ba4 auto/sources
--- a/auto/sources Fri Nov 29 12:53:33 2019 +0300
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1575040761 -10800
# Fri Nov 29 18:19:21 2019 +0300
# Node ID 2fe16e7da8e46423ec644df709ae2acb4c5c9cdf
# Parent 01c7375c9b5ca47e0eda9a7bddf6aacbefbebaff
[mq]: Great_Promise
diff -r 01c7375c9b5c -r 2fe16e7da8e4 auto/sources
--- a/auto/sources Fri Nov 29 12:53:33 2019 +0300
# HG changeset patch
# User Alexander Borisov <alexander.borisov@nginx.com>
# Date 1575040496 -10800
# Fri Nov 29 18:14:56 2019 +0300
# Node ID c06acccab6a1765544a7c243c9cb23ddd7e296d3
# Parent 01c7375c9b5ca47e0eda9a7bddf6aacbefbebaff
[mq]: Great_Promise
diff -r 01c7375c9b5c -r c06acccab6a1 auto/sources
--- a/auto/sources Fri Nov 29 12:53:33 2019 +0300