Closed
Bug 707196
Opened 13 years ago
Closed 2 years ago
[meta] Deprecate and remove ways of doing blocking I/O on the main thread in JS
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
INVALID
People
(Reporter: philikon, Unassigned)
Details
(Keywords: meta)
Bug 699820 is hurting us in terms of snappiness. Mishaps like bug 707090 and numerous add-ons demonstrate that purely the availability of blocking I/O calls will mean that people will inadvertently implement blocking I/O on the main thread.
I propose that we deprecate and very quickly also *remove* ways to do blocking I/O on the main thread in JavaScript. I suggest starting with obvious culprits like Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream), and from there we can move on to the storage APIs and so on. Can we, perhaps, remove the [scriptable] flag from the relevant interface?
Well, the problem is not creating nsIFileInputStreams, it's reading from them synchronously ... killing nsIFileInputStream's scriptability would be a really big hammer.
Comment 2•13 years ago
|
||
We could check js stacks in debug builds and abort on io on main thread from js - whitelisted legacy files.
Comment 3•13 years ago
|
||
(In reply to Taras Glek (:taras) from comment #2)
> We could check js stacks in debug builds and abort on io on main thread from
> js - whitelisted legacy files.
That doesn't help at all in the fight against bad add-ons.
Comment 4•13 years ago
|
||
(In reply to Shawn Wilsher :sdwilsh from comment #3)
> (In reply to Taras Glek (:taras) from comment #2)
> > We could check js stacks in debug builds and abort on io on main thread from
> > js - whitelisted legacy files.
> That doesn't help at all in the fight against bad add-ons.
Indeed. Doesn't meant we shouldn't start somewhere.
Updated•3 years ago
|
Severity: normal → S3
Comment 5•2 years ago
|
||
Closing inactive metabugs
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•