Package delight.rhinosandox.internal
Class SafeContext
- java.lang.Object
-
- org.mozilla.javascript.ContextFactory
-
- delight.rhinosandox.internal.SafeContext
-
public class SafeContext extends org.mozilla.javascript.ContextFactorysee 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 Classes Modifier and Type Class Description static classSafeContext.CountContext
-
Field Summary
Fields Modifier and Type Field Description SafeClassShutterclassShutterintmaxInstructionslongmaxRuntimeInMs
-
Constructor Summary
Constructors Constructor Description SafeContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectdoTopCall(org.mozilla.javascript.Callable callable, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args)booleanhasFeature(org.mozilla.javascript.Context cx, int featureIndex)org.mozilla.javascript.ContextmakeContext()voidobserveInstructionCount(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 Detail
-
maxRuntimeInMs
public long maxRuntimeInMs
-
maxInstructions
public int maxInstructions
-
classShutter
public SafeClassShutter classShutter
-
-
Method Detail
-
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 java.lang.Object doTopCall(org.mozilla.javascript.Callable callable, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args)- Overrides:
doTopCallin classorg.mozilla.javascript.ContextFactory
-
-