purgeRequests do not purge protocol.js requests, but only old fashion clients, using DevToolsClient.request
Categories
(DevTools :: Framework, defect, P3)
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
.
Reporter | ||
Comment 1•5 years ago
|
||
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...
Updated•5 years ago
|
Updated•2 years ago
|
Description
•