Always set evaluator.thread field in invoke(). Otherwise a TimeoutException will

be thrown if invoke() is called before the execution context is entered, which
is the case when resolving request paths via scripted getChildElement() functions.
This commit is contained in:
hns 2002-11-26 13:24:17 +00:00
parent a6516af320
commit ab349a1c3c

View file

@ -382,6 +382,10 @@ public final class FesiEngine implements ScriptingEngine {
eso = global;
else
eso = getElementWrapper (thisObject);
// Workaround to let the evaluator know about the current thread
// even if enterContext() has not been called yet. Otherwise,
// a TimeoutException would be thrown.
evaluator.thread = Thread.currentThread ();
try {
ESValue[] esv = args == null ? new ESValue[0] : new ESValue[args.length];
for (int i=0; i<esv.length; i++) {