archives

« Bugzilla Issues Index

#4532 — Assignment of global variables deleted by their RHS in strict mode is permitted


See https://esdiscuss.org/topic/assignment-of-global-variables-deleted-by-their-rhs-in-strict-mode.

In short, it is possible to have a Reference to a global variable which has been deleted. Normally, bare assignments to undeclared variables in strict mode cause ReferenceErrors. However, calling PutValue on a reference to a global variable which has been deleted since the reference was created does not throw a ReferenceError in strict mode, even though, at the time of writing, that variable does not exist.

This circumvents a protection which strict mode is intended to provide.