Closed Bug 651641 Opened 13 years ago Closed 13 years ago

Dictionary toJSON function was made [Enumerable]

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Q3 11 - Serrano

People

(Reporter: dschaffe, Assigned: pnkfelix)

References

Details

In the JSON patch the toJSON method in Dictionary was made Enumerable. I don't think any other AS3 classes have the same problem. (ByteArray,Date,...) To reproduce: import flash.utils.*; print("Dictionary"); var d=new Dictionary(); d["key1"]="value1"; for (a in d) { print("item:"+a); } actual output: key1 toJSON expect: key1 (toJSON should not appear) The acceptance test as3/ShellClasses/Dictionary.as reproduces the problem also.
Blocks: 640711
(In reply to comment #0) > In the JSON patch the toJSON method in Dictionary was made Enumerable. I don't > think any other AS3 classes have the same problem. (ByteArray,Date,...) I think it does repro on ByteArray, in some sense: import flash.utils.*; function testDictionary() { print("Dictionary"); var d = new Dictionary(); d["key1"] = "value1"; for (a in d) { print("item: " + a); } } function testByteArray() { print("ByteArray"); var b = new ByteArray(); b[1] = "value1"; for (a in b) { print("item: " + a); } } function testDate() { print("Date"); var d2 = new Date(); d2["key1"] = "value1"; for (a in d2) { print("item: " + a); } } testDictionary(); testByteArray(); testDate(); yields: Dictionary item: key1 item: toJSON ByteArray item: toJSON Date item: key1 Luckily I think I know how to fix this one easily.
Assignee: nobody → fklockii
Flags: in-testsuite?
Flags: flashplayer-qrb+
Flags: flashplayer-injection-
Priority: -- → P3
Target Milestone: --- → Q3 11 - Serrano
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.