Change return value to ecma_value_t for getting internal properties.

Removing a lot of ECMA_PROPERTY_VALUE_PTR macro calls. The only drawback
is free callbacks for native objects cannot be deleted anymore. Redefining
a free callback is a rare case, so this trade-of is acceptable.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-08-31 03:09:50 -07:00
parent bfbe1821b5
commit 548b3b98c2
22 changed files with 239 additions and 330 deletions
+3 -15
View File
@@ -1706,21 +1706,9 @@ jerry_set_object_native_handle (const jerry_value_t obj_val, /**< object to set
ECMA_INTERNAL_PROPERTY_NATIVE_HANDLE,
handle_p);
if (freecb_p != NULL)
{
ecma_create_external_pointer_property (object_p,
ECMA_INTERNAL_PROPERTY_FREE_CALLBACK,
(uintptr_t) freecb_p);
}
else
{
ecma_property_t *prop_p = ecma_find_internal_property (object_p,
ECMA_INTERNAL_PROPERTY_FREE_CALLBACK);
if (prop_p != NULL)
{
ecma_delete_property (object_p, prop_p);
}
}
ecma_create_external_pointer_property (object_p,
ECMA_INTERNAL_PROPERTY_FREE_CALLBACK,
(uintptr_t) freecb_p);
} /* jerry_set_object_native_handle */
/**