Closed Bug 1059555 Opened 10 years ago Closed 10 years ago

SplayTree forEach can unwittingly copy its callable

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: djvj, Assigned: djvj)

Details

Attachments

(1 file)

js/src/ds/SplayTree has this issue where its forEach method can copy the callable struct it gets called with.  This makes it useless for doing things like using forEach to calculate the size of the splay tree, since the callable needs to be passed by reference to maintain the coherency of a count variable.
Attachment #8480626 - Flags: review?(bhackett1024)
Attachment #8480626 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/a2481fd3296c
Assignee: nobody → kvijayan
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: