Iteration in catchguard causes "undefined" exception

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
12 years ago
8 years ago

People

(Reporter: jruderman, Unassigned)

Tracking

({testcase})

Trunk
PowerPC
Mac OS X
testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
function ii() { for (var i in []); } 

try { 
  try{
    throw 5;
  } catch(ex if ii()) {
  }
} catch(er) { 
  alert(er) 
}

Result: alert saying "undefined".

Expected: no alert.
This is not an bug, as ii always returns undefined, which is coerces to false. So the the error won't be caught and propagated to the outer try..catch block.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
Oh but the error "undefined" is indeed a bug, which has been fixed. We now get '5';
Resolution: INVALID → WORKSFORME

Updated

8 years ago
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.