Open Bug 1739389 Opened 3 years ago Updated 3 years ago

Adding `message` event listener on a unloaded worker throws `NS_ERROR_UNEXPECTED`

Categories

(Core :: DOM: Workers, defect, P3)

defect

Tracking

()

Tracking Status
firefox93 --- verified
firefox96 --- verified

People

(Reporter: saschanaz, Unassigned)

Details

iframe = document.createElement("iframe");
document.body.append(iframe);
worker = new iframe.contentWindow.Worker(URL.createObjectURL(new Blob([])));
iframe.remove();
worker.addEventListener("message", () => {});

Copy-paste the code to the console.

Expected: No error as Chrome does, or a web compatible error
Actual: Gecko-specific NS_ERROR_UNEXPECTED

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