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

Issue 668403 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

LiveEdit: can't add new variables to closure

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:
var a = 1; 
setInterval(function(){
   console.log(a);
}, 100);

if I change code to
var a = 1; 
var b = 10;
setInterval(function(){
   console.log(a + b);
}, 100);

I have an error that b is not defined

What is the expected behavior?
after recompile setInterval's function need also rebuild its closure scopes

What went wrong?
error

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
 
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: code hot swapping can't add new variables to closure (was: code how swapping can't add new variables to closure)
Cc: kozyatinskiy@chromium.org
Owner: yangguo@chromium.org
Summary: LiveEdit: can't add new variables to closure (was: code hot swapping can't add new variables to closure)

Sign in to add a comment