facebookarchive/prepack

`__evaluatePureFunction` doesn't properly validate arguments

Open

#2385 aperta il 3 ago 2018

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)JavaScript (520 fork)batch import
bughelp wantedlevel 1 (super easy)

Metriche repository

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

Descrizione

Prepacking the following crashes Prepack.

__evaluatePureFunction("boo");

In the implementation, it shouldn't check via an invariant that the argument is a proper value, but instead it should throw a user-level exception or emit a CompilerDiagnostics error.

Guida contributor