From 6ecee221e70717abab3db1203113f4036dc823d9 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 23 Jun 2003 14:12:42 +0000 Subject: [PATCH] Be more careful about entering and exiting contexts. --- src/helma/scripting/rhino/RhinoEngine.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/helma/scripting/rhino/RhinoEngine.java b/src/helma/scripting/rhino/RhinoEngine.java index 3a9b2fc4..f9664b97 100644 --- a/src/helma/scripting/rhino/RhinoEngine.java +++ b/src/helma/scripting/rhino/RhinoEngine.java @@ -108,7 +108,7 @@ public final class RhinoEngine implements ScriptingEngine { e.printStackTrace(); throw new RuntimeException(e.getMessage()); } finally { - // Context.exit (); + Context.exit (); } } @@ -134,7 +134,7 @@ public final class RhinoEngine implements ScriptingEngine { * engine know it should update its prototype information. */ public void updatePrototypes() { - context = Context.enter(context); + context = Context.enter(); context.setCompileFunctionsWithDynamicScope(true); context.setWrapFactory(core.wrapper); @@ -241,9 +241,9 @@ public final class RhinoEngine implements ScriptingEngine { * execution context has terminated. */ public void exitContext() { - context.exit(); context.removeThreadLocal("reval"); context.removeThreadLocal("engine"); + context.exit(); // unset the thread filed in the FESI evaluator // evaluator.thread = null; @@ -347,11 +347,10 @@ public final class RhinoEngine implements ScriptingEngine { /** * Let the evaluator know that the current evaluation has been * aborted. This is done by setting the thread ref in the evaluator - * object to null. + * object to null. */ public void abort() { - // unset the thread filed in the FESI evaluator - // evaluator.thread = null; + // current request has been aborted. } /**