Fix error instance query if the error is from a Proxy (#4459)
When accessing an error's type there is no need to check the Proxy prototype (as there is none). Fixes: #4440 JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
@@ -170,7 +170,7 @@ ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error typ
|
||||
ecma_standard_error_t
|
||||
ecma_get_error_type (ecma_object_t *error_object) /**< possible error object */
|
||||
{
|
||||
if (error_object->u2.prototype_cp == JMEM_CP_NULL)
|
||||
if (error_object->u2.prototype_cp == JMEM_CP_NULL || ECMA_OBJECT_IS_PROXY (error_object))
|
||||
{
|
||||
return ECMA_ERROR_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user