Closed
Bug 1851759
Opened 3 months ago
Closed 3 months ago
top-level await does not handle for..in
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(firefox119 verified, firefox120 verified)
VERIFIED
FIXED
119 Branch
People
(Reporter: nchevobbe, Assigned: krishna.ravi732)
References
Details
Attachments
(1 file)
Steps to reproduce
- Open the console
- Evaluate the following
j = { "foo": 1, "bar": 2}
await 42
for (var k in j){
console.log(k)
}
Expected results
foo
and bar
are logged to the console output
Actual results
only undefined
is logged
It looks like something is wrong in the transformation we do to the input.
Here's the actual expression we send to the server:
(async () => {
j = {
"foo": 1,
"bar": 2
};
await 42;
return;
})();
the mapping is done in https://searchfox.org/mozilla-central/rev/a4cb813cd4026cc24b45e843222e6a08204bae47/devtools/client/debugger/src/workers/parser/mapAwaitExpression.js
Bug 1839588 would help here, but this can probably be fixed in DevTools codebase.
Updated•3 months ago
|
Severity: -- → S3
Priority: -- → P2
Assignee | ||
Comment 1•3 months ago
|
||
Updated•3 months ago
|
Assignee: nobody → krishna.ravi732
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00a66a4ea7d3 [devtools] Fix incorrect removal of non-expr-stmt when top-level-await is present r=devtools-reviewers,nchevobbe
Comment 3•3 months ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
status-firefox119:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Updated•3 months ago
|
QA Whiteboard: [qa-119b-p2]
Comment 4•2 months ago
|
||
Reproducible on a 2023-09-05 Nightly build on macOS 12.
Verified as fixed on Firefox 119.0b4(build ID: 20231002091755) and Nightly 120.0a1(build ID: 20231002221644) on macOS 12, Windows 10, Ubuntu 22.
You need to log in
before you can comment on or make changes to this bug.
Description
•