Closed Bug 981563 Opened 10 years ago Closed 10 years ago

AppsUtils.loadJSONAsync() can leave it's file handle open

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla31

People

(Reporter: Unfocused, Assigned: marco)

References

Details

AppsUtils.loadJSONAsync() closes a file handle at the end of a try block - this is unsafe, as any exception before there will result in the file handle being left open. The .close() call needs to be done in a finally{} block.
This would already be fixed by bug 980379, but given bug 980379, comment 2 i'm not sure whether i should land this or not.
Fabrice, do you have an opinion here?
Depends on: 980379
Flags: needinfo?(fabrice)
Bug 981085 will switch the implementation away from OS.File, so this bug will probably be soon be resolved by that.
Depends on: 981085
Flags: needinfo?(fabrice)
Fixed by 981085.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → mar.castelluccio
Target Milestone: --- → mozilla31
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.