Skip to content

Commit 422b4c3

Browse files
committed
Removed non-compliant Buffer.prototype.length.
1 parent 75eda2b commit 422b4c3

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/njs_buffer.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -975,25 +975,6 @@ njs_buffer_is_encoding(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
975975
}
976976

977977

978-
static njs_int_t
979-
njs_buffer_prototype_length(njs_vm_t *vm, njs_object_prop_t *prop,
980-
uint32_t unused, njs_value_t *value, njs_value_t *setval,
981-
njs_value_t *retval)
982-
{
983-
njs_typed_array_t *array;
984-
985-
array = njs_buffer_slot_internal(vm, value);
986-
if (njs_slow_path(array == NULL)) {
987-
njs_set_undefined(retval);
988-
return NJS_DECLINED;
989-
}
990-
991-
njs_set_number(retval, array->byte_length);
992-
993-
return NJS_OK;
994-
}
995-
996-
997978
static njs_int_t
998979
njs_buffer_prototype_read_int(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
999980
njs_index_t magic, njs_value_t *retval)
@@ -2481,9 +2462,6 @@ static const njs_object_prop_init_t njs_buffer_prototype_properties[] =
24812462
njs_object_prototype_create_constructor, 0,
24822463
NJS_OBJECT_PROP_VALUE_CW),
24832464

2484-
NJS_DECLARE_PROP_HANDLER(STRING_length, njs_buffer_prototype_length, 0,
2485-
0),
2486-
24872465
NJS_DECLARE_PROP_NATIVE(STRING_readInt8, njs_buffer_prototype_read_int,
24882466
1, njs_buffer_magic(1, 1, 1)),
24892467

0 commit comments

Comments
 (0)