Closed Bug 322957 Opened 19 years ago Closed 15 years ago

TryMethod swallows getter exception

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 547086

People

(Reporter: igor, Assigned: gal)

Details

Consider the following code: var obj = { get toSource() { throw "EXCEPTION"; } }; var got_proper_exception = -1; try { uneval(obj); } catch (e) { got_proper_exception = (e === "EXCEPTION"); } print("got_proper_exception: "+got_proper_exception); When run in js shell the script prints: got_proper_exception: -1 instead of expected: got_proper_exception: true The reason for this is that js_TryMethod explicitly clears pending exception after OBJ_GET_PROPERTY even if this is a legitimate exception from getter.
/cvsroot/mozilla/js/tests/js1_5/Exceptions/regress-322957.js,v <-- regress-322957.js
Flags: testcase+
FYI: js/tests/js1_5/Exceptions/regress-322957.js -> js/tests/js1_5/extensions/regress-322957.js
Flags: wanted1.9.2?
Assignee: general → gal
Looks I fixed this inadvertently. I re-enabled the test. http://hg.mozilla.org/tracemonkey/rev/110112bebb00
Leap forward 200,000 bugs. Took us 4 years to fix this one ;)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Flags: wanted1.9.2?
You need to log in before you can comment on or make changes to this bug.