Add info to external pointer free callback. (#4642)

Furthermore reduce memory consumption when only
one external pointer is assigned to an object.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-13 09:51:39 +02:00
committed by GitHub
parent b3ec217b50
commit 053389de80
28 changed files with 304 additions and 123 deletions
+6 -4
View File
@@ -150,11 +150,13 @@ struct test_data
};
static void
proxy_native_freecb (void *user_p)
proxy_native_freecb (void *native_p, /**< native pointer */
jerry_object_native_info_t *info_p) /**< native info */
{
TEST_ASSERT (user_p != NULL);
struct test_data *native_p = (struct test_data *) user_p;
native_p->value = -1;
TEST_ASSERT (native_p != NULL);
TEST_ASSERT (info_p->free_cb == proxy_native_freecb);
struct test_data *data_p = (struct test_data *) native_p;
data_p->value = -1;
} /* proxy_native_freecb */
static const jerry_object_native_info_t proxy_native_info =