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

Issue 749007 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Errors in apply function don't lead to the correct line-number

Reported by noahbres...@gmail.com, Jul 26 2017

Issue description

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

Steps to reproduce the problem:
1. Call a function foo() via the prototype.apply() function
2. If an error occurs in foo(), devtools reports that error happened in the line .apply was called, not where the actual error is in foo()

What is the expected behavior?
The error to show at the line in foo() where the error occurs. Not where foo() is called.

What went wrong?
Dev tools reports error in line 697 where the function is called via apply.

The error actually occurs in line 905 (error has been fixed in screenshot but it originally was 'let child1')

Did this work before? N/A 

Chrome version: 57.0.2987.110  Channel: stable
OS Version: 4.10.17
Flash Version: 

You developers are doing a great job. The Chrome dev tools are awesome. Have a lovely day :)
 
Screenshot from 2017-07-26 05-00-24.png
16.4 KB View Download
Screenshot from 2017-07-26 04-59-56.png
32.5 KB View Download
Screenshot from 2017-07-26 05-00-54.png
9.9 KB View Download
Labels: Needs-Milestone
Labels: -OS-Linux OS-All
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Hmmm.. I can partially repro this:

function foo() {
    let x;
    let x;
}
foo.apply(null, [5])


Uncaught SyntaxError: Identifier 'x' has already been declared       VM287:3
    at <anonymous>:5:5
(anonymous)	@	VM287:5

Note that location at the right (VM287:3) is correct, while both error description and location below it are from apply line.

Status: Fixed (was: Assigned)
I believe that it's fixed in Canary - I can not reproduce it. Feel free to reopen this issue if it's still reproducible.

Sign in to add a comment