Errors in apply function don't lead to the correct line-number
Reported by
noahbres...@gmail.com,
Jul 26 2017
|
|||
Issue descriptionUserAgent: 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 :)
,
Jul 27 2017
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.
,
Sep 21 2017
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 |
|||
Comment 1 by ranjitkan@chromium.org
, Jul 27 2017