Details
-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b98
-
generic
-
generic
-
Verified
Description
A function loaded and returned from a foreign context can't be called with new operator.
Test case:
var se = new javax.script.ScriptEngineManager();
var e = se.getEngineByName("nashorn");
e.eval("function doIt2(){}");
var b = e.getBindings(javax.script.ScriptContext.ENGINE_SCOPE);
for( k in b){
new b[k]();
}
Test case:
var se = new javax.script.ScriptEngineManager();
var e = se.getEngineByName("nashorn");
e.eval("function doIt2(){}");
var b = e.getBindings(javax.script.ScriptContext.ENGINE_SCOPE);
for( k in b){
new b[k]();
}