Object.toString() fails silently on XML objects (E4X)

VERIFIED FIXED in mozilla1.8beta4

Status

()

P1
minor
VERIFIED FIXED
14 years ago
12 years ago

People

(Reporter: gaubugzilla, Assigned: brendan)

Tracking

({js1.5})

Trunk
mozilla1.8beta4
js1.5
Points:
---
Bug Flags:
blocking1.8b5 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
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

14 years ago
Created attachment 190011 [details]
Testcase

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

14 years ago
Assignee: general → brendan
(Assignee)

Comment 2

14 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

14 years ago
Created attachment 190060 [details] [diff] [review]
never perpetrate a silent failure

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 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

14 years ago
Fixed.

/be
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

14 years ago
Flags: testcase?

Comment 6

13 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+

Comment 7

12 years ago
verified fixed 1.9 20060818 windows/mac*/linux
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.