facebookarchive/prepack

Produce abstract string for JSON.stringify(concreteObject) if properties are abstract

Open

#1012 aperta il 27 set 2017

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (520 fork)batch import
abstractbughelp wantedtest needed

Metriche repository

Star
 (14.268 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

If a concrete object has properties with abstract values, the interpretation of SerializeJSONProperty in src/intrinsics/ecma262/JSON.js will either fail obscurely or do the wrong thing, such as returning undefined.

It would be better to first check for this case and then go into the JSON.stringify part of the special case code for dealing with JSON.parse(JSON.stringify(abstractObject)).

Guida contributor