vmMod

object vmMod
class Object
trait Matchable
class Any

Type members

Classlikes

@native @JSType
trait BaseOptions extends StObject
Companion
object
object BaseOptions
Companion
class
@native @JSType
trait CompileFunctionOptions extends StObject with BaseOptions
Companion
object
@native @JSType
trait CreateContextOptions extends StObject
Companion
object
Companion
class
@JSType
trait MeasureMemoryMode extends StObject
Companion
object
Companion
class
@native @JSType
trait MeasureMemoryOptions extends StObject
Companion
object
Companion
class
@native @JSType
trait MemoryMeasurement extends StObject
Companion
object
Companion
class
@native @JSType
trait RunningScriptOptions extends StObject with BaseOptions
Companion
object
Companion
class
@JSImport("vm", "Script") @native @JSType
class Script extends StObject
@native @JSType
trait ScriptOptions extends StObject with BaseOptions
Companion
object
Companion
class

Types

type Context = Dict[Any]

Value members

Concrete methods

@inline
def compileFunction(code: String): Function
@inline
def compileFunction(code: String, params: Array[String]): Function
@inline
def compileFunction(code: String, params: Array[String], options: CompileFunctionOptions): Function
@inline
def compileFunction(code: String, params: Unit, options: CompileFunctionOptions): Function
@inline
@inline
def createContext(sandbox: Context): Context
@inline
@inline
def createContext(sandbox: Unit, options: CreateContextOptions): Context
@inline
def isContext(sandbox: Context): Boolean
@inline

Measure the memory known to V8 and used by the current execution context or a specified context.

Measure the memory known to V8 and used by the current execution context or a specified context.

The format of the object that the returned Promise may resolve with is specific to the V8 engine and may change from one version of V8 to the next.

The returned result is different from the statistics returned by v8.getHeapSpaceStatistics() in that vm.measureMemory() measures the memory reachable by V8 from a specific context, while v8.getHeapSpaceStatistics() measures the memory used by an instance of V8 engine, which can switch among multiple contexts that reference objects in the heap of one engine.

@inline
@inline
def runInContext(code: String, contextifiedSandbox: Context): Any
@inline
def runInContext(code: String, contextifiedSandbox: Context, options: RunningScriptOptions): Any
@inline
def runInContext(code: String, contextifiedSandbox: Context, options: String): Any
@inline
def runInNewContext(code: String): Any
@inline
def runInNewContext(code: String, sandbox: Context): Any
@inline
def runInNewContext(code: String, sandbox: Context, options: RunningScriptOptions): Any
@inline
def runInNewContext(code: String, sandbox: Context, options: String): Any
@inline
def runInNewContext(code: String, sandbox: Unit, options: RunningScriptOptions): Any
@inline
def runInNewContext(code: String, sandbox: Unit, options: String): Any
@inline
def runInThisContext(code: String): Any
@inline
def runInThisContext(code: String, options: RunningScriptOptions): Any
@inline
def runInThisContext(code: String, options: String): Any

Concrete fields

@JSImport("vm") @native
val ^: Any