use a static method to toggle this setting on/off instead.

mainly because it makes it so we don't have to use set! in clj_rhino,
since that namespace already defines a function called set! ...
This commit is contained in:
Gered 2014-02-20 18:09:59 -05:00
parent b2fa9f54c5
commit e0ecb7e62b

View file

@ -4,7 +4,12 @@ import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContextFactory;
public class DynamicScopeContextFactory extends ContextFactory {
public static boolean useDynamicScope;
static boolean useDynamicScope;
public static boolean toggleDynamicScopeCreation(boolean enable) {
useDynamicScope = enable;
return useDynamicScope;
}
@Override
protected boolean hasFeature(Context cx, int featureIndex) {