Closed
Bug 322957
Opened 19 years ago
Closed 15 years ago
TryMethod swallows getter exception
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
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.
Comment 1•19 years ago
|
||
/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
Updated•16 years ago
|
Flags: wanted1.9.2?
Assignee | ||
Updated•15 years ago
|
Assignee: general → gal
Assignee | ||
Comment 3•15 years ago
|
||
Looks I fixed this inadvertently.
I re-enabled the test.
http://hg.mozilla.org/tracemonkey/rev/110112bebb00
Assignee | ||
Comment 4•15 years ago
|
||
Leap forward 200,000 bugs. Took us 4 years to fix this one ;)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Updated•9 years ago
|
Flags: wanted1.9.2?
You need to log in
before you can comment on or make changes to this bug.
Description
•