Closed Bug 1769848 Opened 2 years ago Closed 2 years ago

Improve ShadowRealm Syntax Error messages

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When issuing a syntax error during ShadowRealm.prototype.evaluate, we should aspire to produce error messages of the same quality as eval.

Currently, all syntax errors are eaten, and a 'generic' "Syntax Error" message is emitted, due to the requirement that the error message be issued from the callee realm, not the ShadowRealm.

This should be rectifiable by copying relevant information out of the SyntaxError object.

If you add new error messages, make sure to document them on MDN, and to link them in the dev tools.
If you need any help for that, ping me on Matrix.

Severity: -- → S3
Priority: -- → P1

By cloning the actual syntax error, we get the lovely usability of eval
error messages, but with the correct global.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dded94430704
Improve ShadowRealm Syntax Error messages through cloning r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: