Open Bug 1848136 Opened 1 year ago Updated 1 year ago

Can't trace worker threads because of an exception

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: ochameau, Assigned: ochameau)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

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.

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?

Severity: -- → S3
Priority: -- → P3

(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.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: