Can't trace worker threads because of an exception
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The following exception prevents tracing the worker threads:
Error while calling actor 'tracer's method 'startTracing'" "Services.scriptSecurityManager is undefined"
This is especially easy to reproduce when enabling tracing from the browser toolbox.
Assignee | ||
Comment 1•1 year ago
|
||
This requires to manually toggle "dom.worker.console.dispatch_events_to_main_thread" to false
in order to spawn targets for workers.
I had to disable throttling for workers because of missing setTimeout/clearTimeout methods
in worker modules. Hopefully we could get access to these methods when migrating to ESM?
Updated•1 year ago
|
Comment 2•1 year ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #1)
I had to disable throttling for workers because of missing setTimeout/clearTimeout methods
in worker modules. Hopefully we could get access to these methods when migrating to ESM?
WorkerDebuggerGlobalScope doesn't implement setTimeout, just setImmediate[1]. We can add one, but it would be good to understand the use case, especially if it's for something like batching where we might be able to add a custom API that could be potentially more power-saving aware if early and/or late transmission are both fine. By default we'd probably also cancel the timeouts when canceling the worker with no recourse.
1: This is implemented as a runnable and so will happen strictly after the microtask queue is processed but before any content runnables run. (We always process debugger runnables in preference over content runnables.)
Description
•