try-finally where try throws runs finally with exception pending

RESOLVED FIXED in mozilla1.8.1beta2

Status

()

Core
JavaScript Engine
P1
normal
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: brendan, Assigned: brendan)

Tracking

({fixed1.8.1})

Trunk
mozilla1.8.1beta2
fixed1.8.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.8.1 +
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
Before, this could lead to confusion due to JS_IsExceptionPending usage and the like. Now it will lead to odd failure due to immediate rethrow on js_Interpret reentry (e.g., from eval). See bug 341821.

ECMA-262 Edition 3 12.14 semantics for the second production are clear.  We need to save the result of evaluating the try block while evaluating the finally, and propagate that result if the finally completes normally (not abruptly, e.g. by throwing or returning).

/be
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
Priority: -- → P1
(Assignee)

Comment 1

12 years ago
Created attachment 230825 [details] [diff] [review]
fix

Shaver, it would be great if you could give this a look too.

/be
Attachment #230825 - Flags: superreview?(shaver)
Attachment #230825 - Flags: review?(mrbkap)
(Assignee)

Updated

12 years ago
Flags: blocking1.8.1?

Updated

12 years ago
Flags: blocking1.8.1? → blocking1.8.1+
Comment on attachment 230825 [details] [diff] [review]
fix

sr=shaver
Attachment #230825 - Flags: superreview?(shaver) → superreview+

Updated

12 years ago
Attachment #230825 - Flags: review?(mrbkap) → review+
(Assignee)

Comment 3

12 years ago
Fixed on trunk.

/be
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Updated

12 years ago
Attachment #230825 - Flags: approval1.8.1?
Comment on attachment 230825 [details] [diff] [review]
fix

a=mconnor on behalf of drivers for 1.8 branch
Attachment #230825 - Flags: approval1.8.1? → approval1.8.1+
(Assignee)

Updated

12 years ago
Keywords: fixed1.8.1

Updated

12 years ago
Flags: in-testsuite-
(Assignee)

Updated

12 years ago
Depends on: 346494
You need to log in before you can comment on or make changes to this bug.