Fix bug that evaluator.thread was not set when parsing scripts.
This commit is contained in:
parent
a4e36e6ae3
commit
ab14bbb898
1 changed files with 11 additions and 6 deletions
|
@ -123,6 +123,8 @@ public class FesiEngine implements ScriptingEngine {
|
|||
* necessary to bootstrap the rest is parsed.
|
||||
*/
|
||||
private void initialize () {
|
||||
// set the thread filed in the FESI evaluator
|
||||
evaluator.thread = Thread.currentThread ();
|
||||
Collection protos = app.getPrototypes();
|
||||
for (Iterator i=protos.iterator(); i.hasNext(); ) {
|
||||
Prototype proto = (Prototype) i.next ();
|
||||
|
@ -132,6 +134,7 @@ public class FesiEngine implements ScriptingEngine {
|
|||
// we always need it and there's no chance to trigger
|
||||
// creation on demand.
|
||||
getPrototype ("global");
|
||||
evaluator.thread = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -268,6 +271,8 @@ public class FesiEngine implements ScriptingEngine {
|
|||
* engine know it should update its prototype information.
|
||||
*/
|
||||
public void updatePrototypes () {
|
||||
// set the thread filed in the FESI evaluator
|
||||
evaluator.thread = Thread.currentThread ();
|
||||
Collection protos = app.getPrototypes();
|
||||
for (Iterator i=protos.iterator(); i.hasNext(); ) {
|
||||
Prototype proto = (Prototype) i.next ();
|
||||
|
|
Loading…
Add table
Reference in a new issue