New issue
Advanced search Search tips

Issue 920326 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Need WebUSB API support from an uninterruptible worker context

Reported by gregjho...@gmail.com, Jan 9

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36

Steps to reproduce the problem:
https://github.com/gregjhogan/autoecu/blob/master/src/ecu.worker.js

What is the expected behavior?

What went wrong?
I attempted to build a web app that flashes firmware utilizing the WebUSB API inside a Dedicated Web Worker.

I ran into two issues:
1. I need to maintain a programming session by sending keep-alive messages periodically, and switching tabs will interrupt periodically sending keep-alive messages
2. The firmware flashing is interrupted if you switch tabs in the middle of the flashing process, which is not ideal.  

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 70.0.3538.102  Channel: stable
OS Version: 
Flash Version: 

reference (asked to open this ticket here):
https://github.com/WICG/webusb/issues/73#issuecomment-449667257
 
Cc: altimin@chromium.org
altimin@, this looks like a case where timer throttling in workers is causing issues and the CPU-load based throttling it looks like you are investigating in issue 776416 might help. Can you comment on the best workaround available for this developer?
Labels: Needs-Milestone

Comment 3 by reillyg@chromium.org, Jan 16 (6 days ago)

Labels: -Pri-2 Pri-3
Ping altimin@ for comment.

Comment 4 by altimin@chromium.org, Today (18 hours ago)

We haven't shipped worker throttling to stable yet, so it's probably something else. It seems that most likely thing is that you hit a main thread which is throttled.

Could you record a trace: https://www.chromium.org/developers/how-tos/trace-event-profiling-tool/recording-tracing-runs

The interesting categories are toplevel, blink, renderer.scheduler and sequence_manager.

Sign in to add a comment