Closed Bug 1641490 Opened 5 years ago Closed 5 years ago

TargetList::watchTargets should wait for onAvailable to be called on service worker targets

Categories

(DevTools :: General, task)

task

Tracking

(firefox78 fixed)

RESOLVED FIXED
Firefox 78
Tracking Status
firefox78 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

We are not waiting correctly for service worker targets to be processed in TargetList::watchTargets

      this._legacyProcessesWatcher = new LegacyProcessesWatcher(
        this.targetList,
        targetFront => {
          // Service workers only live in content processes.
          if (!targetFront.isParentProcess) {
            this._onProcessAvailable({ targetFront });
          }
        },
        targetFront => {
          if (!targetFront.isParentProcess) {
            this._onProcessDestroyed({ targetFront });
          }
        }
      );
      await this._legacyProcessesWatcher.listen();

https://searchfox.org/mozilla-central/rev/bc3600def806859c31b2c7ac06e3d69271052a89/devtools/shared/resources/legacy-target-watchers/legacy-workers-watcher.js#139

In the snippet above we should await on this._onProcessAvailable({ targetFront });.

Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb5af8498d9f TargetList::watchTargets should wait for onAvailable to be called on service worker targets r=jlast
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: