« Bugzilla Issues Index
#3781 — 13.6.4.13 ForIn/OfBodyEvaluation: Perform IteratorClose in 5.a - 5.g ?
- bug_id:
3781
- creation_ts:
2015-02-05 14:37:00 -0800
- short_desc:
13.6.4.13 ForIn/OfBodyEvaluation: Perform IteratorClose in 5.a - 5.g ?
- delta_ts:
2015-02-12 12:17:35 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 32: February 2, 2015 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- cc:
marc.nieper+bugzilla
- commentid:
12152
- comment_count:
0
- who:
André Bargull
- bug_when:
2015-02-05 14:37:36 -0800
13.6.4.13 Runtime Semantics: ForIn/OfBodyEvaluation
The newly added IteratorClose calls in destructuring forms, collections etc. call IteratorClose even if the iterator itself throws an exception. Contrary to that 13.6.4.13 only calls IteratorClose when an abrupt completion occurs in step 5.h-i or in 5.k.
Are these differences in the semantics intentional?
- commentid:
12284
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2015-02-10 12:01:00 -0800
fixed in rev33 editor's draft
I was being overly aggressive in classing IteratorClose.
IteratorClose should not be called if the iterator has normally reached its end or for exceptions that originated from the iterator.
In particular we shouldn't call the IteratorClose for exceptions that are received via IteratorStep IteratorNext, IteratorConplete, IteratorValue
I fixed Array destructuring and the built-ins to conform to this rule.
- commentid:
12395
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2015-02-12 12:17:35 -0800
fixed in rev33