Class AlfrescoContextFactory


  • public class AlfrescoContextFactory
    extends org.mozilla.javascript.ContextFactory
    Custom factory that allows to apply configured limits during script executions
    See Also:
    ContextFactory
    • Constructor Detail

      • AlfrescoContextFactory

        public AlfrescoContextFactory()
    • Method Detail

      • makeContext

        protected org.mozilla.javascript.Context makeContext()
        Overrides:
        makeContext in class org.mozilla.javascript.ContextFactory
      • observeInstructionCount

        protected void observeInstructionCount​(org.mozilla.javascript.Context cx,
                                               int instructionCount)
        Overrides:
        observeInstructionCount in class org.mozilla.javascript.ContextFactory
      • doTopCall

        protected 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:
        doTopCall in class org.mozilla.javascript.ContextFactory
      • getOptimizationLevel

        public int getOptimizationLevel()
      • setOptimizationLevel

        public void setOptimizationLevel​(int optimizationLevel)
      • getMaxScriptExecutionSeconds

        public int getMaxScriptExecutionSeconds()
      • setMaxScriptExecutionSeconds

        public void setMaxScriptExecutionSeconds​(int maxScriptExecutionSeconds)
      • getMaxStackDepth

        public int getMaxStackDepth()
      • setMaxStackDepth

        public void setMaxStackDepth​(int maxStackDepth)
      • getMaxMemoryUsedInBytes

        public long getMaxMemoryUsedInBytes()
      • setMaxMemoryUsedInBytes

        public void setMaxMemoryUsedInBytes​(long maxMemoryUsedInBytes)
      • getObserveInstructionCount

        public int getObserveInstructionCount()
      • setObserveInstructionCount

        public void setObserveInstructionCount​(int observeInstructionCount)