Add more skip check options for Proxy objects (#4614)

Reorganize the flags to follow the list in ES2020 section 9.5

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-03-03 17:12:36 +01:00
committed by GitHub
parent 129ca4946c
commit a95e3e37e1
6 changed files with 127 additions and 33 deletions
+4 -3
View File
@@ -94,8 +94,9 @@ These option bits allow specializing Proxies with non-standard behaviour.
These flags are recommended only for those trusted Proxies, whose handlers
produce correct results.
- JERRY_PROXY_SKIP_GET_CHECKS - skip [[Get]] result checks
- JERRY_PROXY_SKIP_GET_OWN_PROPERTY_CHECKS - skip [[GetOwnProperty]] result checks
- JERRY_PROXY_SKIP_RESULT_VALIDATION - skip result validation for [[GetPrototypeOf]], [[SetPrototypeOf]], [[IsExtensible]],
[[PreventExtensions]], [[GetOwnProperty]], [[DefineOwnProperty]], [[HasProperty]],
[[Get]], [[Set]], [[Delete]] and [[OwnPropertyKeys]]
*New in version [[NEXT_RELEASE]]*.
@@ -5760,7 +5761,7 @@ main (void)
jerry_value_t target = jerry_create_object ();
jerry_value_t handler = jerry_create_object ();
jerry_value_t proxy = jerry_create_special_proxy (target, handler, JERRY_PROXY_SKIP_GET_CHECKS);
jerry_value_t proxy = jerry_create_special_proxy (target, handler, JERRY_PROXY_SKIP_RESULT_VALIDATION);
jerry_release_value (target);
jerry_release_value (handler);