archives

« Bugzilla Issues Index

#2709 — 8.1.1.1.6 GetBindingValue: Throw ReferenceError on access to uninitialized binding


8.1.1.1.6 GetBindingValue(N,S), step 3a

According to rwaldron, access on uninitialized is supposed to throw a ReferenceError regardless of the strict mode setting.


For context: https://github.com/nzakas/understandinges6/issues/51#issuecomment-40899532


fixed in rev24 editor's draft

getting the value of an unitialized binding is now always a Reference error, regardless of the setting of the S argument. This is necessary to make TDZs work correctly.

This is not a breaking change from ES5 be cause in ES5 all newly created bindings were immediately initialized.


fixed in rev24