Open Bug 1604213 Opened 5 years ago Updated 2 years ago

Worker is listed in Threads panel after refresh

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: Honza, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

STR:

  1. Open the Toolbox select the Debugger panel
  2. Load http://janodvarko.cz/tests/debugger/workers/
  3. Click Start Worker in test case#2, the debugger should pause
  4. Reload the page
  5. Check out the Threads panel, the worker worker2.js is still there => BUG

ER: the worker2.js should not be listed in Threads panel anymore

Honza

Attached image image.png (deleted) —

Also note that the Watch Expressions panel is out of sync after page reload.
The Main Thread is selected and globalVariable expression coming from the worker2.js shows Just a test - it should show undefined.

Honza

The problem here is that when reloading the debugger never detaches from the worker threads on the page. If those workers are paused then they will persist past the reload and be re-attached to, despite the fact they are associated with content that isn't being shown anymore. The best fix here is I think to detach from these dedicated workers before navigating, so that they will resume execution and terminate as expected before the debugger tries to fetch the workers again. This patch also fixes the watch expression problem, which is a similar issue --- the watch expression reducer isn't being reset after navigating.

Assignee: nobody → bhackett1024
Status: NEW → ASSIGNED
Assignee: bhackett1024 → nobody
Status: ASSIGNED → NEW

Is the patch here still relevant?

Nicolas, can we use the path? Feels a bit obsolete (pre-fission).

Flags: needinfo?(nchevobbe)

I feel like it wouldn't be too hard to reuse it, but it also feels like this should be handled at the framework level, and the debugger would be notified about the workers being removed through the target command.

Flags: needinfo?(nchevobbe)
Assignee: nobody → bhackett1024
Status: NEW → ASSIGNED

I closed the revision on Phabricator.

Assignee: bhackett1024 → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: