Author: Stephan <step...@stzal.com> Branch: Changeset: r319:16f3a9108e70 Date: 2012-12-11 17:41 +0100 http://bitbucket.org/pypy/lang-js/changeset/16f3a9108e70/
Log: handle get_binding_value properly diff --git a/js/environment_record.py b/js/environment_record.py --- a/js/environment_record.py +++ b/js/environment_record.py @@ -108,7 +108,12 @@ # 10.2.1.1.4 def get_binding_value(self, identifier, strict=False): assert identifier is not None and isinstance(identifier, unicode) - assert self.has_binding(identifier) + if not self.has_binding(identifier): + if strict: + from js.execution import JsReferenceError + raise JsReferenceError(identifier) + else: + return w_Undefined return self._get_binding(identifier) # 10.2.1.1.5 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit