New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 743157 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: [esmodules] Syntax error results in wrong line number and wrong source

Reported by kevinpsc...@gmail.com, Jul 14 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3157.3 Safari/537.36

Steps to reproduce the problem:
Load a module containing a syntax error directly via <script type="module"> or indirectly via a transitive `import` statement.

What is the expected behavior?
- Syntax error reported in console with link to module and line number causing error
- Clicking link should open module in sources tab

What went wrong?
- The syntax error is always reported as line 1 of the _first_ module that was loaded, even if the syntax error was in a transitive dependency
- Clicking the link opens a source tab whose contents is only "((e) => { throw e; })"

Did this work before? No 

Chrome version: 61.0.3157.3  Channel: canary
OS Version: OS X 10.12.5
Flash Version:
 
module-error.zip
633 bytes Download
module-error.png
39.3 KB View Download

Comment 1 by alph@chromium.org, Jul 14 2017

Cc: yangguo@chromium.org
Components: -Platform>DevTools Platform>DevTools>JavaScript
Owner: kozyatinskiy@chromium.org

Comment 2 by alph@chromium.org, Jul 14 2017

Status: Assigned (was: Unconfirmed)
Cc: adamk@chromium.org
Status: Fixed (was: Assigned)
This one was fixed by @adamk by https://chromium-review.googlesource.com/c/chromium/src/+/629299.
Works fine in latest Canary, thanks for report!

Sign in to add a comment