Open Bug 1720732 Opened 10 months ago Updated 8 months ago

Fix out of order resources


(DevTools :: Framework, enhancement)



(Not tracked)


(Reporter: ochameau, Assigned: ochameau, NeedInfo)




(1 file)

  async _onResourceAvailable({ targetFront, watcherFront }, resources) {
    for (let resource of resources) {
      if (watcherFront) {
        targetFront = await this._getTargetForWatcherResource(resource);

This async call to _getTargetForWatcherResource may potentialy delay some resources, introducing some unwanted delay between resource reception by ResourceCommand, and their addition to the throttling queue.
Because of this resources having some async delay here may be added out of order in the throttling queue.
This was something we identified in bug 1717050 and was quite puzzling.

This helps ResourceCommand immediately throttle parent process resources.
Without this, when we don't have server side target switching enabled,
and still create the top level target via the TabDescriptor, we are still
asynchronous and this can be confusing from ResourceCommand.onResourceAvailable.

May be we could have two versions of this function?
One synchronous for ResourceCommand and another, more powerful but async
for inspector codebase (which should also work for BC ids of same-process iframes).

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:ochameau, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(poirot.alex)
Flags: needinfo?(jdescottes)
Flags: needinfo?(jdescottes)
You need to log in before you can comment on or make changes to this bug.