Closed Bug 1204834 Opened 10 years ago Closed 10 years ago

OS.File.writeAtomic should take care to keep the path argument alive

Categories

(Toolkit Graveyard :: OS.File, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: gfritzsche, Assigned: gfritzsche, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [lang=js][good first bug])

Attachments

(1 file)

writeAtomic keeps the arguments it posts to its worker alive with a closure: https://dxr.mozilla.org/mozilla-central/rev/29b2df16e961fbe9a379362ecba6f888d1754bc3/toolkit/components/osfile/modules/osfile_async_front.jsm#1178 However, it doesn't keep |path| alive there, possibly leading to races.
Actually, I don't think that a race is possible here, at least if `path` is a string. Anyway, fixing this bug should be quite easy. In function `writeAtomic`, linked above, we just need to add argument `path` to the second array.
Mentor: dteller
Component: Async Tooling → OS.File
Whiteboard: [lang=js][good first bug]
Attached patch FixSplinter Review
Assignee: nobody → gfritzsche
Status: NEW → ASSIGNED
Attachment #8661155 - Flags: review?(dteller)
Attachment #8661155 - Flags: review?(dteller) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: