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

Issue 668401 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

LiveEdit: works incorrect for nested function

Reported by x.ce...@gmail.com, Nov 24 2016

Issue description

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

Steps to reproduce the problem:
for example I have a code

```
function abc() {
   var a = 123;
   setInterval(function(){
      console.log(a);
   }, 1000);
}

```

What is the expected behavior?
nested functions should also recompiled or change its closure scopes

What went wrong?
if I change "a" variable value to any other setInterval's function still linked with old "a" value

Did this work before? N/A 

Chrome version: 57.0.2929.4  Channel: canary
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0
 
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on Windows 7 & Mac 10.11.6 with Chrome stable version#54.0.2840.99 , Latest Canary version#57.0.2931.0.

Observed output as 'Undefined' when we run the above code in Devtools->Console.

Please find the attached screencast for reference & let us know if we miss anything to reproduce the issue.

If possible ,Please provide us the actual & expected behaviour screenshot for better understanding.

Thank you.
668401.mp4
620 KB View Download

Comment 2 by x.ce...@gmail.com, Nov 25 2016

video.mp4
608 KB View Download
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: kozyatinskiy@chromium.org
Owner: yangguo@chromium.org
Summary: LiveEdit: works incorrect for nested function (was: code hot swapping works incorrect for nested function)

Comment 6 by kozy@chromium.org, Jun 26 2018

Status: WontFix (was: Assigned)
It is expected. It is possible to edit callback passed into setInterval and change value there using liveedit as shown in comment #2. When you change value in outer scope we replace outer function code with new one but we do not run this function again since we only restart functions which are currently on stack.

Sign in to add a comment