|
||||||||
PREV NEXT | FRAMES NO FRAMES |
ClassRepository
instead.SecuritySupport
class is deprecated. See its documentation for the upgrade path.
Script.exec(Context cx, Scriptable scope)
of
script 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.
observeInstructionCount()
.
FunctionObject.getArity()
.
WrapFactory
and Context.getWrapFactory()
false
if result of Java method, which is instance of
String, Number, Boolean and
Character, should be used directly as JavaScript primitive
type.
- isSealed() -
Method in class org.mozilla.javascript.ScriptableObject
- Return true if this object is sealed.
get
if the property is not
found.
ClassShutter
interface with the single ClassShutter.visibleToScripts(String fullClassName)
method and the abstract SecurityController
class to implement domain-based security restrictions.
For binary compatibility with older code implementing SecuritySupport only to restrict class access via the visibleToScripts method, this interface extends ClassShutter
, so to upgrade you code in this case simply replace SecuritySupport by ClassShutter and remove empty implementation of the defineClass, getClassContext and getSecurityDomain methods. Then call Context.setClassShutter(ClassShutter)
in place ofContext.setSecuritySupport(SecuritySupport)
.
The new SecurityController
is incompatible with the old security implementation, so if you previously had non-trivial implementation of the defineClass, getClassContext and getSecurityDomain methods, you need to upgrade you code to use the new SecurityController
.
SecuritySupport
class is deprecated. See its documentation for the upgrade path.
WrapFactory
and Context.setWrapFactory(WrapFactory)
Context.setWrapFactory(WrapFactory)
Once an instance of this class or an extension of this class is enabled
for a given context (by calling setWrapFactory on that context), Rhino
will call the methods of this class whenever it needs to wrap a value
resulting from a call to a Java method or an access to a Java field.WrapFactory
.
Note that when extending WrapFactory
you should call
super.wrap(...)
instead of returning null to get default behavior.
You should also take into account that
WrapFactory.wrap(Context cx, Scriptable scope, Object obj, Class cls)
can be called when obj == null
|
||||||||
PREV NEXT | FRAMES NO FRAMES |