console - ReferenceError display is postponed until remaining code finishes execution

RESOLVED WORKSFORME

Status

()

Firefox
Developer Tools: Console
RESOLVED WORKSFORME
2 years ago
2 years ago

People

(Reporter: hello, Unassigned)

Tracking

45 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8690067 [details]
A screenshot of the behaviour

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.7 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.7

Steps to reproduce:

I wrote and executed the following code in the console:

if(true) {
    let m = "yo";

    console.log(m);
}

console.log(m)



Actual results:

Output:

ReferenceError: m is not defined
yo



Expected results:

Output:

yo
ReferenceError: m is not defined

I expect that because the exception was raised by code which is written after the code which produces correct output.
Component: Untriaged → Developer Tools: Console
Product: Core → Firefox
I wasn't able to reproduce this.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.