Issue metadata
Sign in to add a comment
|
console variable scop bug
Reported by
g.baillo...@gmail.com,
Aug 23
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Steps to reproduce the problem:
1. Create a class with 1 public method, and 2 private méthod like this :
var _testFct = function () {
alert("test");
};
var _testFct2 = function () {
alert("test2");
};
_self.test = function () {
debugger;
_testFct2();
};
2. Call the "test" method from outside (click on button for example)
3. In the console, when we reach "debugger;" type the following commands
"_testFct()" and "_testFct2()"
What is the expected behavior?
Both command should work and show an alertbox
What went wrong?
"_testFct()" crashed seems that the console doesn't know this method
for "_testFct2()" It worked fine...
Are we forced to WRITE each variable in a function in order to access it within consol ? i don't think so.
Tested on IE, FF, Opera it works as expected
Did this work before? N/A
Chrome version: 68.0.3440.106 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
,
Aug 24
g.baillonrafart@ - Thanks for filing the issue...!! Could you please provide a sample test file/url to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Aug 24
hi, thanks for your reply. you can find the described behavior here : https://codepen.io/anon/pen/JaYBKB Be sure to have DevTools opened when you click on the button
,
Aug 24
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 25
,
Sep 21
The root of this bug is that V8 optimized out references to outer function. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by susan.boorgula@chromium.org
, Aug 23