Closed Bug 1443889 Opened 7 years ago Closed 6 years ago

Web Replay: Support web workers

Categories

(Core :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox60 --- affected

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(5 files)

The following patches add support for web workers when using Web Replay. Executions using workers can be recorded and replayed, but the debugger cannot yet be used to set breakpoints in worker code or otherwise observe their state.
The trigger and weak pointer APIs in web replay could not be used off the main thread. This patch fixes that and tweaks the semantics of ExecuteTriggers to support its use on web worker threads.
Assignee: nobody → bhackett1024
Only consider scripts and other content from the JSRuntime on the main thread in the replay debugger, and do a little cleanup.
Web workers need larger stacks than most other threads, and since with web replay we spawn all threads up front and give them a fixed stack size before content has tried to spawn them and indicate a stack size, this patch just increases the stack size for all spawned threads.
Since part 1 allows ExecuteTriggers to be called on any thread, this patch fixes the call to this in the nsThread event loop so that it is called on all such threads (including those for web workers).
Remove the restriction that web workers can't be used when recording/replaying. This also makes a couple fixes to the worker code for web replay: - Don't process callbacks during the JS interrupt callback. This callback runs at non-deterministic points during replay so can't perform actions that interact with the recording at all. This change might cause problems for workers that iloop, and might need a more robust/complicated alternative approach in the future. - Use the record/replay trigger mechanism to perform cycle collections at deterministic points in execution.
Closing this bug, all the changes here will be reviewed in separate bugs dependent on bug 1422587.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: