Closed Bug 1746186 Opened 5 months ago Closed 5 months ago

reportError() / self.onerror does not follow the specification


(Core :: DOM: Core & HTML, defect)




97 Branch
Tracking Status
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- fixed


(Reporter: annevk, Assigned: evilpie)


(Blocks 1 open bug, Regressed 1 open bug)



(1 file)

As per we should not allow the message (and other arguments to onerror) be supplied by script, but

self.onerror=(a, b, c, d, e) => console.log(a,b,c,d,e)

shows we do.

Per investigation by Jan it's likely that is the culprit here, hence filing it against the JS component as a start. I suggest that we essentially remove the duck-typing there, at least when it comes to non-chrome code, but ideally we just don't have it.

This came up on Twitter in (Note that even if the message comes from us this might not completely solve the problem as shown in, but there's no reason for us to be different from Chrome for the above case. We might want to argue for less implementation-defined messages based on this.)

We should probably investigate if we can remove WithSideEffects completely, considering that devtools handle this stuff themself anyway.

However in this specific case we can just change the callers: and

Assignee: nobody → evilpies
Component: JavaScript Engine → DOM: Core & HTML
Severity: -- → S3
Attachment #9255537 - Attachment description: WIP: Bug 1746186 - Don't observablely sniff in reportError() → Bug 1746186 - Don't observablely sniff objects in reportError(). r?smaug
Blocks: 1746427
Pushed by
Don't observablely sniff objects in reportError(). r=smaug
Created web-platform-tests PR for changes under testing/web-platform/tests
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1749002
You need to log in before you can comment on or make changes to this bug.