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:
Péter Gál
2021-01-13 15:14:04 +01:00
committed by GitHub
parent 3dc6ed0dd5
commit 75586242ba
2 changed files with 37 additions and 1 deletions
+1 -1
View File
@@ -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;
}