Open
Bug 1494728
Opened 6 years ago
Updated 2 years ago
Debugger.isCompilableUnit doesn't seem to work well with top-level await expressions
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(Not tracked)
NEW
People
(Reporter: nchevobbe, Unassigned)
References
(Blocks 2 open bugs)
Details
**Steps to reproduce**
1. Open the console
2. Type `await Promise(`
3. Hit Enter
**Expected results**
The JsTerm detect that the input is malformed and add a new line (like when typing `Promise(`)
**Actual results**
The input gets evaluated (and throws)
---
In the JsTerm, the Enter key handler should detect input that shouldn't be executed using Debugger.isCompilableUnit [1], but my guess is that it does not work at all, since top-level await are not valid (yet).
https://searchfox.org/mozilla-central/rev/ce57be88b8aa2ad03ace1b9684cd6c361be5109f/devtools/client/webconsole/components/JSTerm.js#208-210
Reporter | ||
Comment 1•6 years ago
|
||
It would be nice if we could fix that before shipping top level await support in the jsterm.
Priority: -- → P2
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•