Open Bug 1619642 Opened 5 years ago Updated 2 years ago

purgeRequests do not purge protocol.js requests, but only old fashion clients, using DevToolsClient.request

Categories

(DevTools :: Framework, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

The following method:
https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/devtools/shared/client/devtools-client.js#646
forces to purge and reject all pending request made to a tab/process which has been destroyed.
It helps identifying pending requests in test teardown, but also help preventing having always pending requests, which would be pending until we close the client.

And actually, we have some code pattern, where we first wait for some pending requests before trying to close the client:
https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/devtools/shared/fronts/targets/target-mixin.js#438-449
So that this code sometimes never resolves and is blocked on line 438 await front.

This comes from the fact that protocol.js uses one list of pending requests per Front instance:
https://searchfox.org/mozilla-central/source/devtools/shared/protocol/Front.js#42
So, in order to reject all the pending one, we would have to reach out to each impacted/all front instance...

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.