Closed Bug 347674 Opened 18 years ago Closed 18 years ago

ReferenceError thrown when accessing exception bound in a catch block in a try block within that catch block

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: Waldo, Assigned: brendan)

Details

(Keywords: verified1.8.1)

Attachments

(2 files)

Testcase coming in a second...
Attached file Testcase
Attached patch fixSplinter Review
Recent regression, from patch for bug 343765.  The bug is that block depth for a with object must be stack index of object named in with statement head, not one more than that index.  This matches block depth for a block (scope) object, which is the index of the first local in the block (empty blocks are never generated).

So the condition for popping block and with objects from the scope chain in the JSOP_SETSP case as patched for bug 343765, OBJ_BLOCK_DEPTH(cx, obj) < i (not <= i) is correct.  The bug is that the "block depth" given to with objects in the case for JSOP_ENTERWITH is off by one (too high). 

Must fix for 1.8.1/fx2/js1.7 -- basic ECMA conformance, core language runtime semantics must be correct.

/be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #232503 - Flags: review?(mrbkap)
Attachment #232503 - Flags: approval1.8.1?
Comment on attachment 232503 [details] [diff] [review]
fix

mrbkap out of town still, looking for r=shaver -- he knows this code (and the JSOP_SETSP code) too.

/be
Attachment #232503 - Flags: review?(shaver)
Fixed on trunk.

/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: blocking1.8.1?
Resolution: --- → FIXED
Checking in regress-347674.js;
/cvsroot/mozilla/js/tests/js1_5/Exceptions/regress-347674.js,v  <--  regress-347674.js
initial revision: 1.1

with edits for bug number and contributor.
Flags: in-testsuite+
Comment on attachment 232503 [details] [diff] [review]
fix

a=drivers
Attachment #232503 - Flags: approval1.8.1? → approval1.8.1+
Fixed on the 1.8 branch too.

/be
Keywords: fixed1.8.1
Attachment #232503 - Flags: review?(mrbkap) → review+
verified fixed 1.9 win/mac(ppc|tel)/linux 20060808
Status: RESOLVED → VERIFIED
verified fixed 1.8 20060809 mac(ppc|tel)/linux. Unfortunately I don't have windows test results for 20060809 1.8, but verifying anyway.
Flags: blocking1.8.1?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: