Don't use property list pointer to store Proxy flags (#4415)

Proxy flags (IsCallable, IsConstructor) can't be stored on the
property list compressed pointer. As adding a Proxy to a WeakSet
would add a property to the Proxy object causing failures down the line.

The prototype internal "slot" can be used to store there flags as
it is not used in case of Proxies (as per standard).

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-07 11:53:59 +01:00
committed by GitHub
parent 128f18a225
commit 61d172aaaf
6 changed files with 120 additions and 31 deletions
+2 -2
View File
@@ -2166,8 +2166,8 @@ do \
* Description of Proxy objects.
*
* A Proxy object's property list is used to store extra information:
* * The "header.u1.property_list_cp" 1st tag bit stores the IsCallable information.
* * The "header.u1.property_list_cp" 2nd tag bit stores the IsConstructor information.
* * The "header.u2.prototype_cp" 1st tag bit stores the IsCallable information.
* * The "header.u2.prototype_cp" 2nd tag bit stores the IsConstructor information.
*/
typedef struct
{