Add 'type' argument to set/get native handle API (#1711)

Ecma-object have native handle type inside, and binding code could use
type info to validate native handle's type.

Related issue #1681

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
This commit is contained in:
Zidong Jiang
2017-04-10 16:51:37 +08:00
committed by GitHub
parent 574dff512e
commit e522e740a7
12 changed files with 486 additions and 141 deletions
+2 -2
View File
@@ -731,9 +731,9 @@ ecma_free_property (ecma_object_t *object_p, /**< object the property belongs to
if (ECMA_PROPERTY_GET_NAME_TYPE (*property_p) == ECMA_STRING_CONTAINER_MAGIC_STRING)
{
if (name_cp == LIT_INTERNAL_MAGIC_STRING_NATIVE_HANDLE
|| name_cp == LIT_INTERNAL_MAGIC_STRING_FREE_CALLBACK)
|| name_cp == LIT_INTERNAL_MAGIC_STRING_NATIVE_POINTER)
{
ecma_free_external_pointer_in_property (property_p);
ecma_free_native_package_property (property_p, (lit_magic_string_id_t) name_cp);
break;
}
}