Closed Bug 335351 Opened 18 years ago Closed 12 years ago

Array:toSource:Sharp variables:on custom toSource items

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: BijuMailList, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

Array:toSource:Sharp variables:on custom toSource items

I was trying to make a complete javascript solution for 
http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_thread/thread/9146f158f3a8497f
and noticed a incorrect behaviour in toSouce of Array object if an item has custom toSource function.

function b(){
}

b.prototype.toSource = function toSource(){
  return '["a"]';
};

a=new b();

({x:a,y:a}).toSource();  // gives ({x:#1=["a"], y:#1#})

([a,a]).toSource(); //gives [["a"], ["a"]] expected [#1=["a"], #1#]



step:-

1. navigate attachment "Array_toSource_sharp.html"
2. click Input Case "0" link
3. Click "test" button
4. repeat for links 1, 2, 3, 4 ....
bug 335052 E4X:toSource of [] and {} not consistent
Blocks: 368267
Bug 566700 removed sharp syntax.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: