Struct v8::context::Context
[−]
[src]
pub struct Context(_, _);
A sandboxed execution context with its own set of built-in objects and functions.
Methods
impl Context
[src]
fn new(isolate: &Isolate) -> Context
Creates a new context and returns a handle to the newly allocated context.
fn make_current(&self) -> ContextGuard
Binds the context to the current scope.
Within this scope, functionality that relies on implicit contexts will work.
fn global(&self) -> Object
Returns the global proxy object.
Global proxy object is a thin wrapper whose prototype points to actual context's global object with the properties like Object, etc. This is done that way for security reasons (for more details see https://wiki.mozilla.org/Gecko:SplitWindow).
Please note that changes to global proxy object prototype most probably would break VM---v8 expects only global object as a prototype of global proxy object.
unsafe fn from_raw(isolate: &Isolate, raw: ContextRef) -> Context
Creates a context from a set of raw pointers.
fn as_raw(&self) -> ContextRef
Returns the underlying raw pointer behind this context.
Trait Implementations
impl Debug for Context
[src]
impl Clone for Context
[src]
fn clone(&self) -> Context
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more