Closed
Bug 301553
Opened 20 years ago
Closed 20 years ago
Object.toString() fails silently on XML objects (E4X)
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8beta4
People
(Reporter: jwkbugzilla, Assigned: brendan)
Details
(Keywords: js1.5)
Attachments
(2 files)
|
227 bytes,
text/html
|
Details | |
|
736 bytes,
patch
|
shaver
:
review+
brendan
:
approval1.8b4+
|
Details | Diff | Splinter Review |
The following code results in execution being aborted without any message on the
JS console:
var x = <xml/>;
Object.toString.apply(x);
A try ... catch block doesn't change anything. The method should produce
something meaningful instead or at least produce an exception.
| Reporter | ||
Comment 1•20 years ago
|
||
This testcase should show a message box before and after calling
Object.toString(). Instead, only the alert box before the call is displayed,
despite the try ... catch block around the call.
| Assignee | ||
Updated•20 years ago
|
Assignee: general → brendan
| Assignee | ||
Comment 2•20 years ago
|
||
Another ancient bug exposed by E4X's anti-traditional method hiding.
/be
Status: NEW → ASSIGNED
Flags: blocking1.8b4+
Keywords: js1.5
Priority: -- → P1
Target Milestone: --- → mozilla1.8beta4
| Assignee | ||
Comment 3•20 years ago
|
||
js_TryMethod and js_TryValueOf are all about being infallible predicates that
suppress exceptions. This is a very old bug.
/be
Attachment #190060 -
Flags: review?(shaver)
Attachment #190060 -
Flags: approval1.8b4+
Comment 4•20 years ago
|
||
Comment on attachment 190060 [details] [diff] [review]
never perpetrate a silent failure
r=shaver. That's an old bug!
Attachment #190060 -
Flags: review?(shaver) → review+
| Assignee | ||
Comment 5•20 years ago
|
||
Fixed.
/be
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Flags: testcase?
Comment 6•20 years ago
|
||
Checking in regress-301553.js;
/cvsroot/mozilla/js/tests/e4x/Regress/regress-301553.js,v <-- regress-301553.js
initial revision: 1.1
Flags: testcase? → testcase+
You need to log in
before you can comment on or make changes to this bug.
Description
•