type conversion to string incorrectly handles 'null' returned by user-defined toString

RESOLVED FIXED

Status

()

RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: luke, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
Build Identifier: 

This is a bug in two functions: ArgToRootedString and js_ValueToString.
To exercise the bug in js_ValueToString:

print({toString:function(){return null}})
// should print 'null'

To exercise the path through ArgToRootedString:

print(escape({toString:function(){return null}}))
// should print 'null'

This fix is part of the patch in bug 200505

Reproducible: Always
(Reporter)

Updated

9 years ago
Depends on: 200505
Flags: in-testsuite?
(Reporter)

Updated

9 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Reporter)

Updated

8 years ago
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.