Closed Bug 898371 Opened 6 years ago Closed 6 years ago

[binary data] crash enumerating properties

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: nmatsakis, Unassigned)

References

Details

Attachments

(1 file)

The following test crashes enumerating properties:

```
var PixelType = new StructType({x: uint8, y: uint8});
var pixel = new PixelType({x: 1, y: 2});
print(JSON.stringify(pixel));
```

I believe it is necessary to implement the enumerate hook.
This adds an enumerate method, but the output I see from the test is `{y:0}` not `{x:0,y:0}` as expected.
Attachment #781706 - Flags: review?(nsm.nikhil)
Comment on attachment 781706 [details] [diff] [review]
bug898371-enumerate.diff

Review of attachment 781706 [details] [diff] [review]:
-----------------------------------------------------------------

Small bug in setting the initial state. Landing with fix.
Attachment #781706 - Flags: review?(nsm.nikhil) → review+
https://hg.mozilla.org/mozilla-central/rev/97ad9f8fd485
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.