Uses of Class
org.mozilla.javascript.Context
Package
Description
Provides the public API for the CommonJS Modules/1.1 implementation.
Provides default implementations for module providers.
-
Uses of Context in org.loboevolution.html.js
Modifier and TypeMethodDescriptionstatic Context
Executor.createContext
(LoboContextFactory factory) Modifier and TypeMethodDescriptionWindowImpl.getWindowScope
(Context context) Getter for the field windowScope. -
Uses of Context in org.loboevolution.js
Modifier and TypeMethodDescriptionJavaConstructorObject.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Call the function.JavaFunctionObject.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Call the function.JavaConstructorObject.construct
(Context cx, Scriptable scope, Object[] args) Call the function as a constructor.JavaFunctionObject.construct
(Context cx, Scriptable scope, Object[] args) Call the function as a constructor.protected boolean
LoboContextFactory.hasFeature
(Context cx, int featureIndex) -
Uses of Context in org.mozilla.javascript
Modifier and TypeMethodDescriptionstatic Context
Context.enter()
Same as callingContextFactory.enterContext()
on the global ContextFactory instance.static Context
Deprecated.final Context
ContextFactory.enter()
Deprecated.useContextFactory.enterContext()
insteadContextFactory.enterContext()
Get a context associated with the current thread, creating one if need be.final Context
ContextFactory.enterContext
(Context cx) Get a Context associated with the current thread, using the given Context if need be.protected abstract Context
VMBridge.getContext
(Object contextHelper) GetContext
instance associated with the current thread or null if none.static Context
Context.getCurrentContext()
Get the current Context.protected Context
ContextFactory.makeContext()
Create newContext
instance to be associated with the current thread.Modifier and TypeMethodDescriptionRegExpProxy.action
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, int actionType) static Object
static void
ScriptRuntime.addInstructionCount
(Context cx, int instructionsToAdd) static void
ScriptRuntimeES6.addSymbolSpecies
(Context cx, Scriptable scope, IdScriptableObject constructor) Registers the symbol[Symbol.species]
on the given constructor function.static void
ScriptRuntimeES6.addSymbolUnscopables
(Context cx, Scriptable scope, IdScriptableObject constructor) Registers the symbol[Symbol.unscopables]
on the given constructor function.static Object
ScriptRuntime.applyOrCall
(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Function.prototype.apply and Function.prototype.callstatic Scriptable
ScriptRuntime.bind
(Context cx, Scriptable scope, String id) Returns the object in the scope chain that has a given property.ArrowFunction.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) BaseFunction.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Should be overridden.BoundFunction.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] extraArgs) Callable.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Perform the call.Delegator.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Function.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Call the function.FunctionObject.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Performs conversions on argument types if needed and invokes the underlying Java method or constructor.IdFunctionObject.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) LambdaConstructor.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) LambdaFunction.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeContinuation.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeJavaClass.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeJavaConstructor.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeJavaMethod.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeJavaTopPackage.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) abstract Object
PolicySecurityController.SecureCaller.call
(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) static Object
Deprecated.The method is only present for compatibility.abstract Object
SecureCaller.call
(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Synchronizer.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) static Object
ScriptRuntime.callIterator
(Object obj, Context cx, Scriptable scope) Given an object, get the "Symbol.iterator" element, throw a TypeError if it is not present, then call the result, (throwing a TypeError if the result is not a function), and return that result, whatever it is.static Object
ScriptableObject.callMethod
(Context cx, Scriptable obj, String methodName, Object[] args) Call a method of an object.static Ref
ScriptRuntime.callRef
(Callable function, Scriptable thisObj, Object[] args, Context cx) Perform function call in reference context.static Object
ScriptRuntime.callSpecial
(Context cx, Callable fun, Scriptable thisObj, Object[] args, Scriptable scope, Scriptable callerThis, int callType, String filename, int lineNumber, boolean isOptionalChainingCall) PolicySecurityController.callWithDomain
(Object securityDomain, Context cx, Callable callable, Scriptable scope, Scriptable thisObj, Object[] args) SecurityController.callWithDomain
(Object securityDomain, Context cx, Callable callable, Scriptable scope, Scriptable thisObj, Object[] args) CallCallable.call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
of callable under restricted security domain where an action is allowed only if it is allowed according to the Java stack on the moment of the execWithDomain call and securityDomain.static NativeContinuation
Interpreter.captureContinuation
(Context cx) static RegExpProxy
ScriptRuntime.checkRegExpProxy
(Context cx) RegExpProxy.compileRegExp
(Context cx, String source, String flags) ArrowFunction.construct
(Context cx, Scriptable scope, Object[] args) BaseFunction.construct
(Context cx, Scriptable scope, Object[] args) BoundFunction.construct
(Context cx, Scriptable scope, Object[] extraArgs) Constructable.construct
(Context cx, Scriptable scope, Object[] args) Call the function as a constructor.Delegator.construct
(Context cx, Scriptable scope, Object[] args) Note that if thedelegee
isnull
, this method creates a new instance of the Delegator itself rather than forwarding the call to thedelegee
.Function.construct
(Context cx, Scriptable scope, Object[] args) Call the function as a constructor.LambdaConstructor.construct
(Context cx, Scriptable scope, Object[] args) LambdaFunction.construct
(Context cx, Scriptable scope, Object[] args) NativeContinuation.construct
(Context cx, Scriptable scope, Object[] args) NativeJavaClass.construct
(Context cx, Scriptable scope, Object[] args) NativeJavaTopPackage.construct
(Context cx, Scriptable scope, Object[] args) static EcmaError
NativeGlobal.constructError
(Context cx, String error, String message, Scriptable scope) Deprecated.UseScriptRuntime.constructError(String,String)
instead.static EcmaError
NativeGlobal.constructError
(Context cx, String error, String message, Scriptable scope, String sourceName, int lineNumber, int columnNumber, String lineSource) Deprecated.void
ContextFactory.Listener.contextCreated
(Context cx) Notify about newly createdContext
object.void
ContextListener.contextEntered
(Context cx) Deprecated.Rhino runtime never calls the method.void
ContextListener.contextExited
(Context cx) Deprecated.Rhino runtime never calls the method.void
ContextFactory.Listener.contextReleased
(Context cx) Notify that the specifiedContext
instance is no longer associated with the current thread.static Object
FunctionObject.convertArg
(Context cx, Scriptable scope, Object arg, int typeTag) static Object
FunctionObject.convertArg
(Context cx, Scriptable scope, Object arg, Class<?> desired) Deprecated.UseFunctionObject.getTypeTag(Class)
andFunctionObject.convertArg(Context, Scriptable, Object, int)
for type conversion.static Scriptable
ScriptRuntime.createArrowFunctionActivation
(NativeFunction funObj, Context cx, Scriptable scope, Object[] args, boolean isStrict, boolean argsHasRest) static Scriptable
ScriptRuntime.createFunctionActivation
(NativeFunction funObj, Context cx, Scriptable scope, Object[] args, boolean isStrict, boolean argsHasRest) Evaluator.createFunctionObject
(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain) Create a function object.Interpreter.createFunctionObject
(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain) BaseFunction.createObject
(Context cx, Scriptable scope) Creates new script object.FunctionObject.createObject
(Context cx, Scriptable scope) Return newScriptable
instance using the default constructor for the class of the underlying Java method.IdFunctionObject.createObject
(Context cx, Scriptable scope) void
ScriptableObject.defineOwnProperties
(Context cx, ScriptableObject props) Defines one or more properties on this object.protected void
IdScriptableObject.defineOwnProperty
(Context cx, Object key, ScriptableObject desc, boolean checkValid) protected void
NativeArray.defineOwnProperty
(Context cx, Object id, ScriptableObject desc, boolean checkValid) void
ScriptableObject.defineOwnProperty
(Context cx, Object id, ScriptableObject desc) Defines a property on an object.protected void
ScriptableObject.defineOwnProperty
(Context cx, Object id, ScriptableObject desc, boolean checkValid) Defines a property on an object.void
ScriptableObject.defineProperty
(Context cx, String name, Function<Scriptable, Object> getter, BiConsumer<Scriptable, Object> setter, int attributes) Define a property on this object that is implemented using lambda functions accepting Scriptable `this` object as first parameter.void
LambdaConstructor.definePrototypeProperty
(Context cx, String name, Function<Scriptable, Object> getter, int attributes) Define a property on the prototype using a function.void
LambdaConstructor.definePrototypeProperty
(Context cx, String name, Function<Scriptable, Object> getter, BiConsumer<Scriptable, Object> setter, int attributes) Define a property on the prototype using functions for getter and setter.boolean
static Object
Deprecated.static Object
Deprecated.static Object
ScriptRuntime.delete
(Object obj, Object id, Context cx, Scriptable scope, boolean isName) The delete operatorstatic boolean
ScriptRuntime.deleteObjectElem
(Scriptable target, Object elem, Context cx) protected Object
ContextFactory.doTopCall
(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Execute top call to script or function.static Object
ScriptRuntime.doTopCall
(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Deprecated.static Object
ScriptRuntime.doTopCall
(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args, boolean isTopLevelStrict) static Object
ScriptRuntime.elemIncrDecr
(Object obj, Object index, Context cx, int incrDecrMask) Deprecated.static Object
ScriptRuntime.elemIncrDecr
(Object obj, Object index, Context cx, Scriptable scope, int incrDecrMask) static Context
Deprecated.useContextFactory.enterContext(Context)
instead as this method relies on usage of a static singleton "global" ContextFactory.static void
ScriptRuntime.enterActivationFunction
(Context cx, Scriptable scope) final Context
ContextFactory.enterContext
(Context cx) Get a Context associated with the current thread, using the given Context if need be.static Scriptable
ScriptRuntime.enterWith
(Object obj, Context cx, Scriptable scope) static Object
static Object
Deprecated.static Object
Deprecated.static Object
ScriptRuntime.enumInit
(Object value, Context cx, Scriptable scope, int enumType) static Boolean
static Object
static String
ScriptRuntime.escapeAttributeValue
(Object value, Context cx) Escapes the reserved characters in a value of an attributestatic String
ScriptRuntime.escapeTextValue
(Object value, Context cx) Escapes the reserved characters in a value of a text nodestatic Object
ScriptRuntime.evalSpecial
(Context cx, Scriptable scope, Object thisArg, Object[] args, String filename, int lineNumber) The eval function property of the global object.Script.exec
(Context cx, Scriptable scope) Execute the script.BaseFunction.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) ES6Generator.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) ES6Iterator.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) IdFunctionCall.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) 'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returnedIdScriptableObject.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) 'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.ImporterTopLevel.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) JavaAdapter.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeArray.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeCall.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeCallSite.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeConsole.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeContinuation.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeGenerator.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeGlobal.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeIterator.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeJavaTopPackage.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeMap.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeObject.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeSet.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeWeakMap.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeWeakSet.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) NativeWith.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) SecurityController.execWithDomain
(Context cx, Scriptable scope, Script script, Object securityDomain) Deprecated.The application should not override this method and instead overrideSecurityController.callWithDomain(Object securityDomain, Context cx, Callable callable, Scriptable scope, Scriptable thisObj, Object[] args)
.static void
ScriptRuntime.exitActivationFunction
(Context cx) static void
ScriptRuntime.fillObjectLiteral
(Scriptable object, Object[] propertyIds, Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope) int
RegExpProxy.find_split
(Context cx, Scriptable scope, String target, String separator, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) static String
NativeConsole.format
(Context cx, Scriptable scope, Object[] args) abstract Object
static Function
TopLevel.getBuiltinCtor
(Context cx, Scriptable scope, TopLevel.Builtins type) Static helper method to get a built-in object constructor with the giventype
from the givenscope
.static Callable
ScriptRuntime.getElemFunctionAndThis
(Object obj, Object elem, Context cx) Deprecated.static Callable
ScriptRuntime.getElemFunctionAndThis
(Object obj, Object elem, Context cx, Scriptable scope) Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static Callable
ScriptRuntime.getElemFunctionAndThisOptional
(Object obj, Object elem, Context cx, Scriptable scope) static Function
ScriptRuntime.getExistingCtor
(Context cx, Scriptable scope, String constructorName) static ScriptableObject
static Callable
ScriptRuntime.getNameFunctionAndThis
(String name, Context cx, Scriptable scope) Prepare for calling name(...): return function corresponding to name and make current top scope available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static Callable
ScriptRuntime.getNameFunctionAndThisOptional
(String name, Context cx, Scriptable scope) static Object
ScriptRuntime.getObjectElem
(Object obj, Object elem, Context cx) Deprecated.static Object
ScriptRuntime.getObjectElem
(Object obj, Object elem, Context cx, Scriptable scope) Call obj.static Object
ScriptRuntime.getObjectElem
(Scriptable obj, Object elem, Context cx) static Object
ScriptRuntime.getObjectIndex
(Object obj, double dblIndex, Context cx) Deprecated.static Object
ScriptRuntime.getObjectIndex
(Object obj, double dblIndex, Context cx, Scriptable scope) A cheaper and less general version of the above for well-known argument types.static Object
ScriptRuntime.getObjectIndex
(Scriptable obj, int index, Context cx) static Object
ScriptRuntime.getObjectProp
(Object obj, String property, Context cx) Deprecated.static Object
ScriptRuntime.getObjectProp
(Object obj, String property, Context cx, Scriptable scope) Version of getObjectElem when elem is a valid JS identifier name.static Object
ScriptRuntime.getObjectProp
(Scriptable obj, String property, Context cx) static Object
ScriptRuntime.getObjectPropNoWarn
(Object obj, String property, Context cx) Deprecated.static Object
ScriptRuntime.getObjectPropNoWarn
(Object obj, String property, Context cx, Scriptable scope) protected ScriptableObject
IdScriptableObject.getOwnPropertyDescriptor
(Context cx, Object id) protected ScriptableObject
NativeArray.getOwnPropertyDescriptor
(Context cx, Object id) protected ScriptableObject
ScriptableObject.getOwnPropertyDescriptor
(Context cx, Object id) static Callable
ScriptRuntime.getPropFunctionAndThis
(Object obj, String property, Context cx) Deprecated.static Callable
ScriptRuntime.getPropFunctionAndThis
(Object obj, String property, Context cx, Scriptable scope) Prepare for calling obj.property(...): return function corresponding to obj.property and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static Callable
ScriptRuntime.getPropFunctionAndThisOptional
(Object obj, String property, Context cx, Scriptable scope) static RegExpProxy
ScriptRuntime.getRegExpProxy
(Context cx) static Comparator
<Object> ArrayLikeAbstractOperations.getSortComparator
(Context cx, Scriptable scope, Object[] args) ArrayLikeAbstractOperations.getSortComparatorFromArguments
(Context cx, Scriptable scope, Object[] args) Evaluator.getSourcePositionFromStack
(Context cx, int[] linep) Get the source position information by examining the stack.Interpreter.getSourcePositionFromStack
(Context cx, int[] linep) static Scriptable
ScriptRuntime.getTemplateLiteralCallSite
(Context cx, Scriptable scope, Object[] strings, int index) static Scriptable
ScriptRuntime.getTopCallScope
(Context cx) static Callable
ScriptRuntime.getValueFunctionAndThis
(Object value, Context cx) Prepare for calling <expression>(...): return function corresponding to <expression> and make parent scope of the function available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static Callable
ScriptRuntime.getValueFunctionAndThisOptional
(Object value, Context cx) boolean
protected boolean
ContextFactory.hasFeature
(Context cx, int featureIndex) Implementation ofhasFeature(int featureIndex)
.static boolean
ScriptRuntime.hasObjectElem
(Scriptable target, Object elem, Context cx) static boolean
ScriptRuntime.hasTopCall
(Context cx) void
ImporterTopLevel.importPackage
(Context cx, Scriptable thisObj, Object[] args, Function funObj) Deprecated.Kept only for compatibility.static boolean
The in operator.static void
ImporterTopLevel.init
(Context cx, Scriptable scope, boolean sealed) static void
JavaAdapter.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeContinuation.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeGlobal.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeJavaTopPackage.init
(Context cx, Scriptable scope, boolean sealed) static void
NativePromise.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeSymbol.init
(Context cx, Scriptable scope, boolean sealed) void
CompilerEnvirons.initFromContext
(Context cx) static void
ScriptRuntime.initFunction
(Context cx, Scriptable scope, NativeFunction function, int type, boolean fromEvalCode) static ScriptableObject
ScriptRuntime.initSafeStandardObjects
(Context cx, ScriptableObject scope, boolean sealed) static void
ScriptRuntime.initScript
(NativeFunction funObj, Scriptable thisObj, Context cx, Scriptable scope, boolean evalScript) final void
NativeFunction.initScriptFunction
(Context cx, Scriptable scope) final void
NativeFunction.initScriptFunction
(Context cx, Scriptable scope, boolean es6GeneratorFunction) void
ImporterTopLevel.initStandardObjects
(Context cx, boolean sealed) static ScriptableObject
ScriptRuntime.initStandardObjects
(Context cx, ScriptableObject scope, boolean sealed) static boolean
ScriptRuntime.instanceOf
(Object a, Object b, Context cx) The instanceof operator.protected abstract boolean
ES6Iterator.isDone
(Context cx, Scriptable scope) protected boolean
NativeArrayIterator.isDone
(Context cx, Scriptable scope) protected boolean
NativeCollectionIterator.isDone
(Context cx, Scriptable scope) protected boolean
NativeStringIterator.isDone
(Context cx, Scriptable scope) static boolean
ScriptRuntime.isIteratorDone
(Context cx, Object result) Given an iterator result, return true if and only if there is a "done" property that's true.static Object
ArrayLikeAbstractOperations.iterativeMethod
(Context cx, ArrayLikeAbstractOperations.IterativeOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "every", "filter", "forEach", "map", and "some" without using an IdFunctionObject.static Object
ArrayLikeAbstractOperations.iterativeMethod
(Context cx, IdFunctionObject fun, ArrayLikeAbstractOperations.IterativeOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "every", "filter", "forEach", "map", and "some" using an IdFunctionObject.static Object
Context.javaToJS
(Object value, Scriptable scope, Context cx) Convenient method to convert java value to its closest representation in JavaScript.RegExpProxy.js_split
(Context _cx, Scriptable _scope, String thisString, Object[] _args) static Scriptable
ScriptRuntime.lastStoredScriptable
(Context cx) static long
ScriptRuntime.lastUint32Result
(Context cx) static boolean
ScriptRuntime.loadFromIterable
(Context cx, Scriptable scope, Object arg1, BiConsumer<Object, Object> setter) This is used to handle all the special cases that are required when invoking Object.fromEntries or constructing a NativeMap or NativeWeakMap from an iterable.static Ref
static Ref
static Object
ScriptRuntime.name
(Context cx, Scriptable scope, String name) Looks up a name in the scope chain and returns its value.static Object
ScriptRuntime.nameIncrDecr
(Scriptable scopeChain, String id, Context cx, int incrDecrMask) static Ref
ScriptRuntime.nameRef
(Object namespace, Object name, Context cx, Scriptable scope, int memberTypeFlags) static Ref
ScriptRuntime.nameRef
(Object name, Context cx, Scriptable scope, int memberTypeFlags) static Scriptable
ScriptRuntime.newArrayLiteral
(Object[] objects, int[] skipIndices, Context cx, Scriptable scope) static Scriptable
ScriptRuntime.newBuiltinObject
(Context cx, Scriptable scope, TopLevel.Builtins type, Object[] args) static Scriptable
ScriptRuntime.newCatchScope
(Throwable t, Scriptable lastCatchScope, String exceptionName, Context cx, Scriptable scope) static Scriptable
ScriptRuntime.newObject
(Object fun, Context cx, Scriptable scope, Object[] args) Operator new.static Scriptable
ScriptRuntime.newObject
(Context cx, Scriptable scope, String constructorName, Object[] args) static Scriptable
ScriptRuntime.newObjectLiteral
(Object[] propertyIds, Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope) static Scriptable
ScriptRuntime.newObjectLiteral
(Object[] propertyIds, Object[] propertyValues, Context cx, Scriptable scope) Deprecated.static Object
ScriptRuntime.newSpecial
(Context cx, Object fun, Object[] args, Scriptable scope, int callType) protected Object
ES6Iterator.next
(Context cx, Scriptable scope) protected abstract Object
ES6Iterator.nextValue
(Context cx, Scriptable scope) protected Object
NativeArrayIterator.nextValue
(Context cx, Scriptable scope) protected Object
NativeCollectionIterator.nextValue
(Context cx, Scriptable scope) protected Object
NativeStringIterator.nextValue
(Context cx, Scriptable scope) protected void
ContextFactory.observeInstructionCount
(Context cx, int instructionCount) Implementation ofobserveInstructionCount(int instructionCount)
.protected void
ContextFactory.onContextCreated
(Context cx) protected void
ContextFactory.onContextReleased
(Context cx) static Object[]
ScriptRuntime.padAndRestArguments
(Context cx, Scriptable scope, Object[] args, int argCount) Helper function for builtin objects that use the varargs form.static Object
NativeJSON.parse
(Context cx, Scriptable scope, String jtext, Callable reviver) void
NativeConsole.ConsolePrinter.print
(Context cx, Scriptable scope, NativeConsole.Level level, Object[] args, ScriptStackElement[] stack) static Object
ScriptRuntime.propIncrDecr
(Object obj, String id, Context cx, int incrDecrMask) Deprecated.static Object
ScriptRuntime.propIncrDecr
(Object obj, String id, Context cx, Scriptable scope, int incrDecrMask) protected Slot
static Object
ArrayLikeAbstractOperations.reduceMethod
(Context cx, ArrayLikeAbstractOperations.ReduceOperation operation, Scriptable scope, Scriptable thisObj, Object[] args) Implements the methods "reduce" and "reduceRight".RefCallable.refCall
(Context cx, Scriptable thisObj, Object[] args) Perform function call in reference context.static Object
static Object
static Object
ScriptRuntime.refIncrDecr
(Ref ref, Context cx, int incrDecrMask) Deprecated.static Object
ScriptRuntime.refIncrDecr
(Ref ref, Context cx, Scriptable scope, int incrDecrMask) static Object
Deprecated.static Object
ScriptRuntime.refSet
(Ref ref, Object value, Context cx, Scriptable scope) static Object
ScriptRuntimeES6.requireObjectCoercible
(Context cx, Object val, IdFunctionObject idFuncObj) static Object
Interpreter.restartContinuation
(NativeContinuation c, Context cx, Scriptable scope, Object[] args) static Object
Interpreter.resumeGenerator
(Context cx, Scriptable scope, int operation, Object savedState, Object value) NativeFunction.resumeGenerator
(Context cx, Scriptable scope, int operation, Object state, Object value) Resume execution of a suspended generator.Execute action using the supplied Context instance.static Object
ScriptRuntime.searchDefaultNamespace
(Context cx) abstract Object
Deprecated.UseRef.set(Context, Scriptable, Object)
insteadRef.set
(Context cx, Scriptable scope, Object value) static Object
ScriptRuntime.setConst
(Scriptable bound, Object value, Context cx, String id) protected abstract void
VMBridge.setContext
(Object contextHelper, Context cx) AssociateContext
instance with the current thread or remove the current association ifcx
is null.static Object
ScriptRuntime.setDefaultNamespace
(Object namespace, Context cx) static void
ScriptRuntime.setFunctionProtoAndParent
(BaseFunction fn, Context cx, Scriptable scope) static void
ScriptRuntime.setFunctionProtoAndParent
(BaseFunction fn, Context cx, Scriptable scope, boolean es6GeneratorFunction) static Object
ScriptRuntime.setName
(Scriptable bound, Object value, Context cx, Scriptable scope, String id) static Object
ScriptRuntime.setObjectElem
(Object obj, Object elem, Object value, Context cx) Deprecated.static Object
ScriptRuntime.setObjectElem
(Object obj, Object elem, Object value, Context cx, Scriptable scope) Call obj.static Object
ScriptRuntime.setObjectElem
(Scriptable obj, Object elem, Object value, Context cx) static Object
ScriptRuntime.setObjectIndex
(Object obj, double dblIndex, Object value, Context cx) Deprecated.static Object
ScriptRuntime.setObjectIndex
(Object obj, double dblIndex, Object value, Context cx, Scriptable scope) A cheaper and less general version of the above for well-known argument types.static Object
ScriptRuntime.setObjectIndex
(Scriptable obj, int index, Object value, Context cx) static Object
ScriptRuntime.setObjectProp
(Object obj, String property, Object value, Context cx) Deprecated.static Object
ScriptRuntime.setObjectProp
(Object obj, String property, Object value, Context cx, Scriptable scope) Version of setObjectElem when elem is a valid JS identifier name.static Object
ScriptRuntime.setObjectProp
(Scriptable obj, String property, Object value, Context cx) static void
ScriptRuntime.setRegExpProxy
(Context cx, RegExpProxy proxy) static Ref
ScriptRuntime.specialRef
(Object obj, String specialProperty, Context cx) Deprecated.static Ref
ScriptRuntime.specialRef
(Object obj, String specialProperty, Context cx, Scriptable scope) static Constructable
AbstractEcmaObjectOperations.speciesConstructor
(Context cx, Scriptable s, Constructable defaultConstructor) Implement the ECMAScript abstract operation "SpeciesConstructor" defined in section 7.2.33 of ECMA262.static void
ScriptRuntime.storeUint32Result
(Context cx, long value) static Object
ScriptRuntime.strictSetName
(Scriptable bound, Object value, Context cx, Scriptable scope, String id) static Object
static JavaScriptException
ScriptRuntime.throwCustomError
(Context cx, Scriptable scope, String constructorName, String message) Equivalent to executing "new $constructorName(message, sourceFileName, sourceLineNo)" from JavaScript.static JavaScriptException
ScriptRuntime.throwError
(Context cx, Scriptable scope, String message) Equivalent to executing "new Error(message, sourceFileName, sourceLineNo)" from JavaScript.static Scriptable
ScriptRuntime.toIterator
(Context cx, Scriptable scope, Scriptable obj, boolean keyOnly) static Scriptable
ScriptRuntime.toObject
(Context cx, Scriptable scope, Object val) Convert the value to an object.static Scriptable
ScriptRuntime.toObject
(Context cx, Scriptable scope, Object val, Class<?> staticClass) Deprecated.UseScriptRuntime.toObject(Context, Scriptable, Object)
instead.static Scriptable
ScriptRuntime.toObjectOrNull
(Context cx, Object obj) Deprecated.static Scriptable
ScriptRuntime.toObjectOrNull
(Context cx, Object obj, Scriptable scope) static BaseFunction
ScriptRuntime.typeErrorThrower
(Context cx) Returns representation of the [[ThrowTypeError]] object.WrapFactory.wrap
(Context cx, Scriptable scope, Object obj, Class<?> staticType) Wrap the object.WrapFactory.wrapAsJavaObject
(Context cx, Scriptable scope, Object javaObject, Class<?> staticType) Wrap Java object as Scriptable instance to allow full access to its methods and fields from JavaScript.static Scriptable
ScriptRuntime.wrapException
(Throwable t, Scriptable scope, Context cx) WrapFactory.wrapJavaClass
(Context cx, Scriptable scope, Class<?> javaClass) Wrap a Java class as Scriptable instance to allow access to its static members and fields and use as constructor from JavaScript.WrapFactory.wrapNewObject
(Context cx, Scriptable scope, Object obj) Wrap an object newly created by a constructor call.RegExpProxy.wrapRegExp
(Context cx, Scriptable scope, Object compiled) static Scriptable
ScriptRuntime.wrapRegExp
(Context cx, Scriptable scope, Object compiled) ModifierConstructorDescriptionArrowFunction
(Context cx, Scriptable scope, Callable targetFunction, Scriptable boundThis) BoundFunction
(Context cx, Scriptable scope, Callable targetFunction, Scriptable boundThis, Object[] boundArgs) ImporterTopLevel
(Context cx, boolean sealed) IteratorLikeIterable
(Context cx, Scriptable scope, Object target) -
Uses of Context in org.mozilla.javascript.commonjs.module
Modifier and TypeMethodDescriptionRequire.call
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Require.construct
(Context cx, Scriptable scope, Object[] args) RequireBuilder.createRequire
(Context cx, Scriptable globalScope) Creates a new require() function.ModuleScriptProvider.getModuleScript
(Context cx, String moduleId, URI moduleUri, URI baseUri, Scriptable paths) Returns a module script.Require.requireMain
(Context cx, String mainModuleId) Calling this method establishes a module as being the main module of the program to which this require() instance belongs.ModifierConstructorDescriptionRequire
(Context cx, Scriptable nativeScope, ModuleScriptProvider moduleScriptProvider, Script preExec, Script postExec, boolean sandboxed) Creates a new instance of the require() function. -
Uses of Context in org.mozilla.javascript.commonjs.module.provider
Modifier and TypeMethodDescriptionCachingModuleScriptProviderBase.getModuleScript
(Context cx, String moduleId, URI moduleUri, URI baseUri, Scriptable paths) MultiModuleScriptProvider.getModuleScript
(Context cx, String moduleId, URI uri, URI base, Scriptable paths) SoftCachingModuleScriptProvider.getModuleScript
(Context cx, String moduleId, URI uri, URI base, Scriptable paths) -
Uses of Context in org.mozilla.javascript.debug
Modifier and TypeMethodDescriptionDebugger.getFrame
(Context cx, DebuggableScript fnOrScript) Called when execution entered a particular function or script.void
Debugger.handleCompilationDone
(Context cx, DebuggableScript fnOrScript, String source) Called when compilation of a particular function or script into internal bytecode is done.void
DebugFrame.onDebuggerStatement
(Context cx) Called when the function or script executes a 'debugger' statement.void
DebugFrame.onEnter
(Context cx, Scriptable activation, Scriptable thisObj, Object[] args) Called when execution is ready to start bytecode interpretation for entered a particular function or script.void
DebugFrame.onExceptionThrown
(Context cx, Throwable ex) Called when thrown exception is handled by the function or script.void
Called when the function or script for this frame is about to return.void
DebugFrame.onLineChange
(Context cx, int lineNumber) Called when executed code reaches new line in the source. -
Uses of Context in org.mozilla.javascript.engine
Modifier and TypeMethodDescriptionstatic void
Builtins.print
(Context cx, Scriptable thisObj, Object[] args, Function f) -
Uses of Context in org.mozilla.javascript.jdk18
Modifier and TypeMethodDescriptionprotected Context
VMBridge_jdk18.getContext
(Object contextHelper) Modifier and TypeMethodDescriptionprotected void
VMBridge_jdk18.setContext
(Object contextHelper, Context cx) -
Uses of Context in org.mozilla.javascript.json
-
Uses of Context in org.mozilla.javascript.optimizer
Modifier and TypeMethodDescriptionstatic Object
static Object
static Function
OptRuntime.bindThis
(NativeFunction fn, Context cx, Scriptable scope, Scriptable thisObj) static Object
OptRuntime.call0
(Callable fun, Scriptable thisObj, Context cx, Scriptable scope) Implement ....() call shrinking optimizer code.static Object
OptRuntime.call0Optional
(Callable fun, Scriptable thisObj, Context cx, Scriptable scope) static Object
OptRuntime.call1
(Callable fun, Scriptable thisObj, Object arg0, Context cx, Scriptable scope) Implement ....static Object
OptRuntime.call2
(Callable fun, Scriptable thisObj, Object arg0, Object arg1, Context cx, Scriptable scope) Implement ....static Object
OptRuntime.callN
(Callable fun, Scriptable thisObj, Object[] args, Context cx, Scriptable scope) Implement ....static Object
OptRuntime.callName
(Object[] args, String name, Context cx, Scriptable scope) Implement name(args) call shrinking optimizer code.static Object
OptRuntime.callName0
(String name, Context cx, Scriptable scope) Implement name() call shrinking optimizer code.static Object
OptRuntime.callName0Optional
(String name, Context cx, Scriptable scope) static Object
OptRuntime.callProp0
(Object value, String property, Context cx, Scriptable scope) Implement x.property() call shrinking optimizer code.static Object
OptRuntime.callProp0Optional
(Object value, String property, Context cx, Scriptable scope) static Object
OptRuntime.callSpecial
(Context cx, Callable fun, Scriptable thisObj, Object[] args, Scriptable scope, Scriptable callerThis, int callType, String fileName, int lineNumber, boolean isOptionalChainingCall) Codegen.createFunctionObject
(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain) static Object
OptRuntime.elemIncrDecr
(Object obj, double index, Context cx, int incrDecrMask) Deprecated.static Object
OptRuntime.elemIncrDecr
(Object obj, double index, Context cx, Scriptable scope, int incrDecrMask) Codegen.getSourcePositionFromStack
(Context cx, int[] linep) static void
OptRuntime.initFunction
(NativeFunction fn, int functionType, Scriptable scope, Context cx) static Scriptable
OptRuntime.newArrayLiteral
(Object[] objects, String encodedInts, int skipCount, Context cx, Scriptable scope) static Object
OptRuntime.newObjectSpecial
(Context cx, Object fun, Object[] args, Scriptable scope, Scriptable callerThis, int callType) -
Uses of Context in org.mozilla.javascript.regexp
Modifier and TypeMethodDescriptionRegExpImpl.action
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, int actionType) RegExpImpl.compileRegExp
(Context cx, String source, String flags) NativeRegExp.execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) int
RegExpImpl.find_split
(Context cx, Scriptable scope, String target, String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) static void
NativeRegExp.init
(Context cx, Scriptable scope, boolean sealed) protected boolean
NativeRegExpStringIterator.isDone
(Context cx, Scriptable scope) RegExpImpl.js_split
(Context cx, Scriptable scope, String target, Object[] args) protected Object
NativeRegExpStringIterator.nextValue
(Context cx, Scriptable scope) RegExpImpl.wrapRegExp
(Context cx, Scriptable scope, Object compiled) -
Uses of Context in org.mozilla.javascript.typedarrays
Modifier and TypeMethodDescriptionstatic void
NativeArrayBuffer.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeDataView.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeFloat32Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeFloat64Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeInt16Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeInt32Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeInt8Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeUint16Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeUint32Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeUint8Array.init
(Context cx, Scriptable scope, boolean sealed) static void
NativeUint8ClampedArray.init
(Context cx, Scriptable scope, boolean sealed) protected static NativeTypedArrayView
<?> NativeTypedArrayView.js_constructor
(Context cx, Scriptable scope, Object[] args, NativeTypedArrayView.TypedArrayConstructable constructable, int bytesPerElement) -
Uses of Context in org.mozilla.javascript.xml
Modifier and TypeMethodDescriptionCustom+
operator.abstract boolean
Implementation of ECMAScript [[Delete]].abstract Object
Implementation of ECMAScript [[Get]].abstract Scriptable
XMLObject.getExtraMethodSource
(Context cx) Return an additional object to look for methods that runtime should consider during method search.abstract Object
XMLObject.getFunctionProperty
(Context cx, int id) abstract Object
XMLObject.getFunctionProperty
(Context cx, String name) abstract boolean
Implementation of ECMAScript [[Has]].abstract boolean
abstract Ref
Generic reference to implement x.abstract Ref
Generic reference to implement x::ns, x.abstract Ref
XMLLib.nameRef
(Context cx, Object namespace, Object name, Scriptable scope, int memberTypeFlags) abstract Ref
XMLLib.nameRef
(Context cx, Object name, Scriptable scope, int memberTypeFlags) abstract void
Implementation of ECMAScript [[Put]].abstract Object
XMLLib.toDefaultXmlNamespace
(Context cx, Object uriValue) Construct namespace for default xml statement.
ContextFactory.enterContext(Context)
instead as this method relies on usage of a static singleton "global" ContextFactory.