src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java
Print this page
*** 701,711 ****
}
final ScriptFunction func = getProgramFunction(clazz, scope);
Object evalThis;
if (directEval) {
! evalThis = callThis instanceof ScriptObject || strictFlag ? callThis : global;
} else {
evalThis = global;
}
return ScriptRuntime.apply(func, evalThis);
--- 701,711 ----
}
final ScriptFunction func = getProgramFunction(clazz, scope);
Object evalThis;
if (directEval) {
! evalThis = (callThis != UNDEFINED && callThis != null) || strictFlag ? callThis : global;
} else {
evalThis = global;
}
return ScriptRuntime.apply(func, evalThis);