Be more careful about entering and exiting contexts.
This commit is contained in:
parent
3443179755
commit
6ecee221e7
1 changed files with 5 additions and 6 deletions
|
@ -108,7 +108,7 @@ public final class RhinoEngine implements ScriptingEngine {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
// Context.exit ();
|
Context.exit ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public final class RhinoEngine implements ScriptingEngine {
|
||||||
* engine know it should update its prototype information.
|
* engine know it should update its prototype information.
|
||||||
*/
|
*/
|
||||||
public void updatePrototypes() {
|
public void updatePrototypes() {
|
||||||
context = Context.enter(context);
|
context = Context.enter();
|
||||||
context.setCompileFunctionsWithDynamicScope(true);
|
context.setCompileFunctionsWithDynamicScope(true);
|
||||||
context.setWrapFactory(core.wrapper);
|
context.setWrapFactory(core.wrapper);
|
||||||
|
|
||||||
|
@ -241,9 +241,9 @@ public final class RhinoEngine implements ScriptingEngine {
|
||||||
* execution context has terminated.
|
* execution context has terminated.
|
||||||
*/
|
*/
|
||||||
public void exitContext() {
|
public void exitContext() {
|
||||||
context.exit();
|
|
||||||
context.removeThreadLocal("reval");
|
context.removeThreadLocal("reval");
|
||||||
context.removeThreadLocal("engine");
|
context.removeThreadLocal("engine");
|
||||||
|
context.exit();
|
||||||
|
|
||||||
// unset the thread filed in the FESI evaluator
|
// unset the thread filed in the FESI evaluator
|
||||||
// evaluator.thread = null;
|
// evaluator.thread = null;
|
||||||
|
@ -347,11 +347,10 @@ public final class RhinoEngine implements ScriptingEngine {
|
||||||
/**
|
/**
|
||||||
* Let the evaluator know that the current evaluation has been
|
* Let the evaluator know that the current evaluation has been
|
||||||
* aborted. This is done by setting the thread ref in the evaluator
|
* aborted. This is done by setting the thread ref in the evaluator
|
||||||
* object to null.
|
* object to null.
|
||||||
*/
|
*/
|
||||||
public void abort() {
|
public void abort() {
|
||||||
// unset the thread filed in the FESI evaluator
|
// current request has been aborted.
|
||||||
// evaluator.thread = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue