public class GraalSandboxImpl extends delight.nashornsandbox.internal.NashornSandboxImpl implements GraalSandbox
| Modifier and Type | Field and Description |
|---|---|
boolean |
isStrict |
allowExitFunctions, allowGlobalsObjects, allowLoadFunctions, allowNoBraces, allowPrintFunctions, allowReadFunctions, cached, engineAsserted, evaluator, executor, lazyInvocable, maxCPUTime, maxMemory, maxPreparedStatements, sandboxClassFilter, sanitizer, scriptEngine, suppliedCache| Constructor and Description |
|---|
GraalSandboxImpl() |
GraalSandboxImpl(String... params) |
| Modifier and Type | Method and Description |
|---|---|
Bindings |
createBindings()
Temporary: GraalJS currently does not support sharing objects across bindings/contexts
|
Bindings |
createNewBindings() |
Object |
eval(String js,
ScriptContext scriptContext,
Bindings bindings)
If a script context is provided, its bindings will be evaluated inside the script engine itself and merged into the engine bindings.
|
protected void |
produceSecureBindings() |
protected void |
resetEngineBindings()
Temporary: GraalJS currently does not support resetting of bindings
|
protected Bindings |
secureBindings(Bindings bindings)
Temporary: GraalJS currently does not support sharing objects across bindings/contexts and has slightly different behavior for engine vs global context
|
allow, allowExitFunctions, allowGlobalsObjects, allowLoadFunctions, allowNoBraces, allowPrintFunctions, allowReadFunctions, disallow, disallowAllClasses, eval, eval, eval, executeSandboxedOperation, get, getExecutor, getSandboxedInvocable, getSanitizer, inject, isAllowed, sanitizeBindings, setExecutor, setMaxCPUTime, setMaxMemory, setMaxPreparedStatements, setScriptCache, setWriterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallow, allowExitFunctions, allowGlobalsObjects, allowLoadFunctions, allowNoBraces, allowPrintFunctions, allowReadFunctions, disallow, disallowAllClasses, eval, eval, eval, get, getExecutor, getSandboxedInvocable, inject, isAllowed, setExecutor, setMaxCPUTime, setMaxMemory, setMaxPreparedStatements, setScriptCache, setWriterpublic GraalSandboxImpl()
public GraalSandboxImpl(String... params)
protected void resetEngineBindings()
resetEngineBindings in class delight.nashornsandbox.internal.NashornSandboxImplhttps://github.com/oracle/graal/issues/631,
https://github.com/graalvm/graaljs/issues/47,
https://github.com/graalvm/graaljs/issues/146public Bindings createBindings()
createBindings in interface delight.nashornsandbox.NashornSandboxcreateBindings in class delight.nashornsandbox.internal.NashornSandboxImplhttps://github.com/oracle/graal/issues/631public Bindings createNewBindings()
createNewBindings in interface GraalSandboxprotected void produceSecureBindings()
protected Bindings secureBindings(Bindings bindings)
secureBindings in class delight.nashornsandbox.internal.NashornSandboxImplhttps://github.com/oracle/graal/issues/631,
https://github.com/graalvm/graaljs/issues/47,
Merges new bindings into existing engine bindings while preserving existing globalspublic Object eval(String js, ScriptContext scriptContext, Bindings bindings) throws delight.nashornsandbox.exceptions.ScriptCPUAbuseException, ScriptException
eval in interface delight.nashornsandbox.NashornSandboxeval in class delight.nashornsandbox.internal.NashornSandboxImpldelight.nashornsandbox.exceptions.ScriptCPUAbuseExceptionScriptExceptionCopyright © 2020. All rights reserved.