Author: hannes
Date: 2009-02-19 23:13:55 +0100 (Thu, 19 Feb 2009)
New Revision: 9527
Modified:
helma-ng/trunk/src/org/helma/javascript/HelmaContextFactory.java
helma-ng/trunk/src/org/helma/tools/HelmaShell.java
Log:
Remove obsolete threadscope code from shell and context factory.
Details at http://dev.helma.org/trac/helma/changeset/9527
Modified: helma-ng/trunk/src/org/helma/javascript/HelmaContextFactory.java
===================================================================
--- helma-ng/trunk/src/org/helma/javascript/HelmaContextFactory.java 2009-02-19 10:30:25 UTC (rev 9526)
+++ helma-ng/trunk/src/org/helma/javascript/HelmaContextFactory.java 2009-02-19 22:13:55 UTC (rev 9527)
@@ -75,7 +75,6 @@
super.onContextReleased(cx);
cx.removeThreadLocal("engine");
cx.removeThreadLocal("modules");
- cx.removeThreadLocal("threadscope");
}
public void setStrictMode(boolean flag) {
Modified: helma-ng/trunk/src/org/helma/tools/HelmaShell.java
===================================================================
--- helma-ng/trunk/src/org/helma/tools/HelmaShell.java 2009-02-19 10:30:25 UTC (rev 9526)
+++ helma-ng/trunk/src/org/helma/tools/HelmaShell.java 2009-02-19 22:13:55 UTC (rev 9527)
@@ -52,7 +52,6 @@
}
public void run() throws IOException {
- Scriptable threadScope = null;
ConsoleReader reader = new ConsoleReader();
reader.setBellEnabled(false);
reader.addCompletor(new JSCompletor());
@@ -62,13 +61,6 @@
int lineno = 0;
repl: while (true) {
Context cx = engine.getContextFactory().enterContext();
- // we need to manage our own thread scope, enterContext() creates a new one
- // by default. It might be preferable to do this in HelmaContextFactory.
- if (threadScope == null) {
- threadScope = (Scriptable) cx.getThreadLocal("threadscope");
- } else {
- cx.putThreadLocal("threadscope", threadScope);
- }
cx.setErrorReporter(new ToolErrorReporter(true, System.out));
String source = "";
String prompt = "helma> ";
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.