Instant evaluation allows side-effects after` await`
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox105 verified, firefox106 verified)
People
(Reporter: cpplearner, Assigned: nchevobbe)
Details
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0
Steps to reproduce:
- Open the Web Console
- Type
await 1; alert("bug")(without the backticks), but don't hit the enter key
Actual results:
A dialog is displayed.
Expected results:
Nothing, as if the expression is not evaluated.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•3 years ago
|
||
Thanks for reporting the issue. I can reproduce it easily
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
104 is impacted.
To begin with, we can simply disable instant-evaluation for top-level await expression, and ask to uplift the patch to 105 to quickly fix the issue.
We may have a follow-up bug to re-enable it, while fixing this specific issue
| Assignee | ||
Comment 4•3 years ago
|
||
Updated•3 years ago
|
Comment 6•3 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 7•3 years ago
|
||
Comment on attachment 9291716 [details]
Bug 1786805 - [devtools] Disable instant evaluation for top-level await expressions. r=jdescottes.
Beta/Release Uplift Approval Request
- User impact if declined: expressions with side effects (e.g. , calling
alert, assigning a variable, changing the dom, …) might be evaluated as the user types in the console input, which could be annoying at best, or plainly confusing - Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: 1. Open the console
- Type
await 1; alert("booh")(without hitting Enter)
-> there should be no alert dialog displayed
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): small DevTools-only patch, simply gating a call to a function
- String changes made/needed:
- Is Android affected?: No
| Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
I have reproduced this issue using Firefox 106.0a1 (2022.08.24) and on Firefox 105.0b4 on Win 10 x64.
I can confirm this issue is fixed, I verified using Firefox 106.0a1 (2022.08.28) on Win 10 x64, macOS 10.15 and Ubuntu 22.04 x64.
Comment 9•3 years ago
|
||
Comment on attachment 9291716 [details]
Bug 1786805 - [devtools] Disable instant evaluation for top-level await expressions. r=jdescottes.
Approved for 105.0b5. Do we want to nominate this for dot release uplift as well?
Comment 10•3 years ago
|
||
| bugherder uplift | ||
Comment 11•3 years ago
|
||
I can confirm this issue is fixed, I verified using Firefox 105.0b5 on Win 10 x64, macOS 10.15 and Ubuntu 22.04 x64.
Description
•