Make JS Schedule API work in a worker

RESOLVED WONTFIX

Status

()

--
enhancement
RESOLVED WONTFIX
7 years ago
6 years ago

People

(Reporter: Yoric, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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

At the moment, the JSScheduleAPI (introduced in bug 692420) requires some XPCOM and generally behaves as if it were always used from the main thread.

It should be simple to adapt the API to make it work in a background thread:
- detect that we are executed outside of XPCOM land (i.e. detect that |Components| is not defined);
- in that context, instead of using XPCOM, simply call |setTimeout|;
- also, in that context, ensure that we do not pollute the global namespace with |exports| and |Private|.
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All
Schedule API will be reimplemented.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.