-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timers should be allowed in browser isolates #21925
Comments
I'm guessing this is Dartium giving the error. Added Area-Dartium, Triaged labels. |
Correct, but you are bringing up a good point. It needs to work in both Dartium and in compiled JS. |
This comment was originally written by @zoechi Using timers in Browser marked as fixed a long time ago (http://dartbug.com/4997) I think these issues are similar/related |
This comment was originally written by @yjbanov #4997 does spawnFunction. I only tried spawning from URI. That might be the difference. |
cc @a-siva. |
Issue #14080 tracks a similar issue (for 'print'). |
This is fixed for 1.9. Isolate.spawnUri still creates a VM isolate in Dartium (i.e. not a WebWorker) but print and timers work, in a somewhat hacky way. Set owner to @alan-knight. |
To reproduce:
import 'dart:async';
void main(args, sendPort) {
Timer.run(() {});
}
This throws: "UnimplementedError: Timers on background isolates are not supported in the browser"
Since isolates compile down to web workers in the browser this functionality should be available.
More info: section "Features Available to Workers" at http://www.html5rocks.com/en/tutorials/workers/basics/
The text was updated successfully, but these errors were encountered: