Details
-
Bug
-
Resolution: Fixed
-
P1
-
8
-
None
-
b108
-
generic
-
generic
-
Verified
Description
A function has a with block, call the function with an instance obj1 then with an instance obj2, in both cases you will get the implicit context to be set to obj1.
This does impact the express/jade node modules templating framework that relies on implicit context being changed.
function f(locals) {
with(locals) { print(user.name);}
}
var obj1 = {};
var obj2 = {user:{name:"toto"}};
try {
f(obj1);
}catch(e){print(e.message);}
f(obj2);
This does impact the express/jade node modules templating framework that relies on implicit context being changed.
function f(locals) {
with(locals) { print(user.name);}
}
var obj1 = {};
var obj2 = {user:{name:"toto"}};
try {
f(obj1);
}catch(e){print(e.message);}
f(obj2);
Attachments
Issue Links
- relates to
-
JDK-8021367 Investigate removal of ScriptObject.context field
- Resolved