Class: Rhino::RestrictableContextFactory

Inherits:
ContextFactory
  • Object
show all
Defined in:
lib/rhino/context.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Context

Constant Summary collapse

@@instance =
nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instanceObject



269
270
271
# File 'lib/rhino/context.rb', line 269

def self.instance
  @@instance ||= new
end

Instance Method Details

#doTopCall(callable, context, scope, this, args) ⇒ Object

protected Object doTopCall(Callable callable, Context context,

Scriptable scope, Scriptable thisObj, Object[] args)


285
286
287
288
# File 'lib/rhino/context.rb', line 285

def doTopCall(callable, context, scope, this, args)
  context.reset! if context.is_a?(Context)
  super
end

#makeContextObject

protected Context makeContext()



274
275
276
# File 'lib/rhino/context.rb', line 274

def makeContext
  Context.new(self)
end

#observeInstructionCount(context, count) ⇒ Object

protected void observeInstructionCount(Context context, int instructionCount)



279
280
281
# File 'lib/rhino/context.rb', line 279

def observeInstructionCount(context, count)
  context.check!(count) if context.is_a?(Context)
end