[webkit-reviews] review requested: [Bug 13517] DOM Exception 8 in finance.aol.com sub-page : [Attachment 15495] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 12 19:07:18 PDT 2007


Cameron Zwarich <cwzwarich at uwaterloo.ca> has asked  for review:
Bug 13517: DOM Exception 8 in finance.aol.com sub-page
http://bugs.webkit.org/show_bug.cgi?id=13517

Attachment 15495: Proposed patch
http://bugs.webkit.org/attachment.cgi?id=15495&action=edit

------- Additional Comments from Cameron Zwarich <cwzwarich at uwaterloo.ca>
Here is a patch that fixes the bug.

The problem was in VarDeclNode::evaluate. If a binding already exists in the
shallowest scope, then a var declaration should do nothing, except possibly
assign to it if there is an initializer. The check was there, but only for var
declarations without initializers. Hence, when there was already a binding in
the shallowest scope from the combination of try / throw, it incorrectly did
not assign to it, and instead caused some strange behaviour.

This patch also fixes bug 14237 and the test js1_5/Scope/regress-185485.js,
which does not include any examples with 'try' and 'catch', only examples using
'with'. Perhaps we should also include Alexey's example as an additional
regression test.

In the patched expected.html there is a recorded failure of the test
ecma/Date/15.9.5.12-6.js, but this has been failing for a while. Should have I
edited this out of the diff somehow, or simply not included the changed file?



More information about the webkit-reviews mailing list