Struct js::jsapi::ScriptEnvironmentPreparer
[−]
[src]
#[repr(C)]pub struct ScriptEnvironmentPreparer { pub _vftable: *const _vftable_ScriptEnvironmentPreparer, }
If the embedder has registered a ScriptEnvironmentPreparer, PrepareScriptEnvironmentAndInvoke will call the preparer's 'invoke' method with the given |closure|, with the assumption that the preparer will set up any state necessary to run script in |scope|, invoke |closure| with a valid JSContext*, report any exceptions thrown from the closure, and return.
If no preparer is registered, PrepareScriptEnvironmentAndInvoke will assert that |rt| has exactly one JSContext associated with it, enter the compartment of |scope| on that context, and invoke |closure|.
In both cases, PrepareScriptEnvironmentAndInvoke will report any exceptions that are thrown by the closure. Consumers who want to propagate back whether the closure succeeded should do so via members of the closure itself.
Fields
_vftable: *const _vftable_ScriptEnvironmentPreparer