mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 11:23:43 +01:00
With ES2015 scripts, a function declaration was judged by a property the
global object inherits, so a fixed property on Object.prototype stopped
`function name() {}`. The check now reads the global object's own
property, as ECMA-262 2015 section 8.1.1.4.16 does, and declares nothing
when the global object is not extensible and has no property of that
name. Indirect eval code makes the same check for all of its functions
before it declares any of them, and a function declaration never adds a
property to a global object that is not extensible.