Package delight.rhinosandox.internal
Class SafeContext
java.lang.Object
org.mozilla.javascript.ContextFactory
delight.rhinosandox.internal.SafeContext
public class SafeContext
extends org.mozilla.javascript.ContextFactory
see http://www-archive.mozilla.org/rhino/apidocs/org/mozilla/javascript/ContextFactory.html
Also see https://github.com/flozano/rhino-sandbox-test/blob/master/src/main/java/com/flozano/rhino/sandbox/SandboxContextFactory.java
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.mozilla.javascript.ContextFactory
org.mozilla.javascript.ContextFactory.GlobalSetter, org.mozilla.javascript.ContextFactory.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intintlong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoTopCall(org.mozilla.javascript.Callable callable, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, Object[] args) booleanhasFeature(org.mozilla.javascript.Context cx, int featureIndex) org.mozilla.javascript.ContextvoidobserveInstructionCount(org.mozilla.javascript.Context cx, int instructionCount) Methods inherited from class org.mozilla.javascript.ContextFactory
addListener, call, checkNotSealed, createClassLoader, enter, enterContext, enterContext, exit, getApplicationClassLoader, getE4xImplementationFactory, getGlobal, getGlobalSetter, hasExplicitGlobal, initApplicationClassLoader, initGlobal, isSealed, onContextCreated, onContextReleased, removeListener, seal
-
Field Details
-
INSTRUCTION_STEPS
private static final int INSTRUCTION_STEPS- See Also:
-
maxRuntimeInMs
public long maxRuntimeInMs -
maxInstructions
public int maxInstructions -
classShutter
-
-
Constructor Details
-
SafeContext
public SafeContext()
-
-
Method Details
-
makeContext
public org.mozilla.javascript.Context makeContext()- Overrides:
makeContextin classorg.mozilla.javascript.ContextFactory
-
hasFeature
public boolean hasFeature(org.mozilla.javascript.Context cx, int featureIndex) - Overrides:
hasFeaturein classorg.mozilla.javascript.ContextFactory
-
observeInstructionCount
public void observeInstructionCount(org.mozilla.javascript.Context cx, int instructionCount) - Overrides:
observeInstructionCountin classorg.mozilla.javascript.ContextFactory
-
doTopCall
public Object doTopCall(org.mozilla.javascript.Callable callable, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, Object[] args) - Overrides:
doTopCallin classorg.mozilla.javascript.ContextFactory
-