firefox-devtools / devtools-core

:rocket: Packages for Firefox DevTools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guard against null worker in packages/devtools-utils/src/worker-utils.js

juliandescottes opened this issue · comments

https://github.com/devtools-html/devtools-core/blob/7ae967805b3cf65d8e6590e72aa41c815b7f08ce/packages/devtools-utils/src/worker-utils.js#L58

It looks like this.workers is null or undefined pops up from time to time on mozilla-central's continuous integration (eg https://bugzilla.mozilla.org/show_bug.cgi?id=1454674)

We should move the check if (!this.workers) located a few lines below before the call to postMessage.