Add check Proxy object [[SetPrototypeOf]] (#4631)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
This commit is contained in:
@@ -361,6 +361,7 @@ ecma_proxy_object_get_prototype_of (ecma_object_t *obj_p) /**< proxy object */
|
||||
*
|
||||
* See also:
|
||||
* ECMAScript v6, 9.5.2
|
||||
* ECMAScript v11: 9.5.2
|
||||
*
|
||||
* Note: Returned value is always a simple value so freeing it is unnecessary.
|
||||
*
|
||||
@@ -422,6 +423,12 @@ ecma_proxy_object_set_prototype_of (ecma_object_t *obj_p, /**< proxy object */
|
||||
|
||||
ecma_free_value (trap_result);
|
||||
|
||||
/* ES11: 9 */
|
||||
if (!boolean_trap_result)
|
||||
{
|
||||
return ecma_make_boolean_value (false);
|
||||
}
|
||||
|
||||
if (obj_p->u2.prototype_cp & JERRY_PROXY_SKIP_RESULT_VALIDATION)
|
||||
{
|
||||
return ecma_make_boolean_value (boolean_trap_result);
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<test id="built-ins/Object/entries/order-after-define-property.js"><reason></reason></test>
|
||||
<test id="built-ins/Object/keys/order-after-define-property.js"><reason></reason></test>
|
||||
<test id="built-ins/Proxy/preventExtensions/trap-is-undefined-target-is-proxy.js"><reason></reason></test>
|
||||
<test id="built-ins/Proxy/setPrototypeOf/toboolean-trap-result-false.js"><reason></reason></test>
|
||||
<test id="built-ins/String/prototype/matchAll/regexp-is-undefined.js"><reason></reason></test>
|
||||
<test id="built-ins/String/prototype/normalize/form-is-not-valid-throws.js"><reason></reason></test>
|
||||
<test id="built-ins/String/prototype/normalize/length.js"><reason></reason></test>
|
||||
|
||||
Reference in New Issue
Block a user