Add reference support for native pointers. (#4615)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-19 14:47:17 +02:00
committed by GitHub
parent cc1a263657
commit ec3ed65b56
23 changed files with 681 additions and 150 deletions
+6 -2
View File
@@ -67,12 +67,16 @@ static const jerry_char_t test_source[] = TEST_STRING_LITERAL (
static const jerry_object_native_info_t thing_a_info =
{
.free_cb = NULL
.free_cb = NULL,
.number_of_references = 0,
.offset_of_references = 0,
};
static const jerry_object_native_info_t thing_b_info =
{
.free_cb = NULL
.free_cb = NULL,
.number_of_references = 0,
.offset_of_references = 0,
};
typedef struct
+2
View File
@@ -35,6 +35,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
@@ -35,6 +35,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
@@ -38,6 +38,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
@@ -38,6 +38,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
@@ -38,6 +38,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
@@ -35,6 +35,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
@@ -36,6 +36,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t
+2
View File
@@ -35,6 +35,8 @@ native_free_cb (void *native_p, /**< native pointer */
static const jerry_object_native_info_t native_info =
{
.free_cb = native_free_cb,
.number_of_references = 0,
.offset_of_references = 0,
};
static jerry_value_t