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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user