New issue
Advanced search Search tips

Issue 842516 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Illegal break statement message displayed in wrong line

Reported by lukas19...@gmail.com, May 13 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36

Steps to reproduce the problem:
1. Run the attached code

function fn()
{
  break;
}

fn();

What is the expected behavior?
An illegal break statement should be reported in line 3 (the line containing the break statement).

What went wrong?
The error is displayed at the call to the function containing the break statement (line 6).

Did this work before? N/A 

Chrome version: 66.0.3359.170  Channel: n/a
OS Version: x86_64 Linux 4.16.8-1-ARCH
Flash Version:
 
breakbug.js
33 bytes View Download
Labels: Needs-Triage-M66
Cc: vamshi.kommuri@chromium.org
Labels: M-68 Triaged-ET FoundIn-68 Target-68 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 66.0.3359.170 and on the latest canary 68.0.3430.0 using Mac 10.13.1, Ubuntu 14.04 and Windows 10. As the issue seen from M60(60.0.3112.0) considering it as Non-Regression and marking it as Untriaged.

Comment 3 by kojii@chromium.org, May 16 2018

Components: -Blink Blink>JavaScript
Components: -Blink>JavaScript Blink>JavaScript>Language
Owner: gsat...@chromium.org
Status: Assigned (was: Untriaged)
I think this is fine as it is. Sathya, what do you think?
Cc: gsat...@chromium.org marja@chromium.org
Components: -Blink>JavaScript>Language Blink>JavaScript>Parser
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)
+marja

This is because our pre parser isn't smart enough to throw all early errors. The current behavior isn't spec compatible, but making the pre parser smarter comes with performance cost.

Related: https://bugs.chromium.org/p/v8/issues/detail?id=5663

We could re-evaluate this in the future but this is WontFix for now.

Sign in to add a comment