Dmitry Volyntsev
August 01, 2018 11:40AM
details: http://hg.nginx.org/njs/rev/4586ae051111
branches:
changeset: 581:4586ae051111
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed Aug 01 18:37:15 2018 +0300
description:
Returning an internal error for not-implemented Function().

This fixes #41 issue on GitHub.

diffstat:

njs/njs_function.c | 2 ++
njs/test/njs_unit_test.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 72aa4d9aa606 -r 4586ae051111 njs/njs_function.c
--- a/njs/njs_function.c Wed Aug 01 18:05:01 2018 +0300
+++ b/njs/njs_function.c Wed Aug 01 18:37:15 2018 +0300
@@ -457,6 +457,8 @@ njs_ret_t
njs_function_constructor(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs,
njs_index_t unused)
{
+ njs_internal_error(vm, "Not implemented");
+
return NXT_ERROR;
}

diff -r 72aa4d9aa606 -r 4586ae051111 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Wed Aug 01 18:05:01 2018 +0300
+++ b/njs/test/njs_unit_test.c Wed Aug 01 18:37:15 2018 +0300
@@ -6518,6 +6518,9 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("function f() {} f.__proto__ === Function.prototype"),
nxt_string("true") },

+ { nxt_string("Function()"),
+ nxt_string("InternalError: Not implemented") },
+
{ nxt_string("RegExp()"),
nxt_string("/(?:)/") },

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

[njs] Returning an internal error for not-implemented Function().

Dmitry Volyntsev 278 August 01, 2018 11:40AM



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

Online Users

Guests: 166
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready