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

Issue 877048 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 826613
Owner:
Closed: Sep 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



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:
 
Capturedevtool.PNG
13.5 KB View Download
Labels: Needs-Triage-M68
Cc: krajshree@chromium.org
Labels: Triaged-ET Needs-Feedback
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...!!
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
Project Member

Comment 4 by sheriffbot@chromium.org, Aug 24

Labels: -Needs-Feedback
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
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Mergedinto: 826613
Status: Duplicate (was: Assigned)
The root of this bug is that V8 optimized out references to outer function.

Sign in to add a comment