I filed a bug, see https://bugzilla.mozilla.org/show_bug.cgi?id=407374

Steps to Reproduce:
function f(a, [b]) {
     java.lang.Thread.sleep(2000);
     print(a + ";" + b);
}
spawn(f, [1, [2]]);
spawn(f, [3, [4]]);
Actual Results:
3;4
1;4

Expected Results:
3;4
1;2

Christophe

Christophe Grand a écrit :
> I report it while it's hot (and I haven't got time to come up with a 
> test yet).
> 
> I have a function with destructured parameters
> (eg function(a, [b]) {...}).
> 
> This function is called from several threads and the b (in this example) 
> appears to be shared :-(
> If I rewrite my functions without destructured parameters (eg 
> function(a, ab) { const b = ab[0]; ... } it solves the problem.
> 
> (Rhino CVS Mode running in compile mode)
> 
> Christophe
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to