Open
Bug 1309500
Opened 9 years ago
Updated 3 years ago
JSONFile should not mix nsIFile and OS.File
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
NEW
People
(Reporter: Yoric, Unassigned)
References
Details
JSONFile currently does I/O on two threads at once. There is potential for data loss. That's not good.
Comment 1•9 years ago
|
||
Am I correct in assuming that JSONFile should exclusively use OS.File, since we are slowly moving away from XPCOM-based stuff? Also, a quick look at the module shows that we are indeed using OS.File almost everywhere in the module barring a few places (actually I could only spot one occurrence, but I might be wrong).
| Reporter | ||
Comment 2•9 years ago
|
||
Well, in general, using `nsIFile` on the main thread is pretty much always a bad idea. The code of JSONFile was extracted from a larger module in which I understand it was necessary and it probably worked, but I believe that making this a tool for use by other modules is a bad idea.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•