[njs] Returning MemoryError exception without any allocations.
Dmitry Volyntsev
xeioex at nginx.com
Fri Jul 13 12:12:30 UTC 2018
details: http://hg.nginx.org/njs/rev/00762256c67a
branches:
changeset: 555:00762256c67a
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Fri Jul 13 15:12:11 2018 +0300
description:
Returning MemoryError exception without any allocations.
diffstat:
njs/njs_vm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (15 lines):
diff -r 0c131f169fe6 -r 00762256c67a njs/njs_vm.c
--- a/njs/njs_vm.c Thu Jul 12 15:24:18 2018 +0300
+++ b/njs/njs_vm.c Fri Jul 13 15:12:11 2018 +0300
@@ -3162,8 +3162,10 @@ again:
if (nxt_slow_path(src->type == NJS_OBJECT_INTERNAL_ERROR)) {
/* MemoryError is a nonextensible internal error. */
+
if (!src->data.u.object->extensible) {
- src = &njs_string_memory_error;
+ njs_string_get(&njs_string_memory_error, dst);
+ return NXT_OK;
}
}
More information about the nginx-devel
mailing list