18#ifndef INCLUDED_SCRIPTENGINE
19#define INCLUDED_SCRIPTENGINE
24#include "js/Initialization.h"
41 ENSURE(
m_Contexts.empty() &&
"JS_Init must be called before any contexts are created!");
47 ENSURE(
m_Contexts.empty() &&
"All contexts must be destroyed before calling JS_ShutDown!");
A class using the RAII (Resource Acquisition Is Initialization) idiom to manage initialization and sh...
Definition: ScriptEngine.h:37
~ScriptEngine()
Definition: ScriptEngine.h:45
void UnRegisterContext(const JSContext *cx)
Definition: ScriptEngine.h:52
std::list< const JSContext * > m_Contexts
Definition: ScriptEngine.h:55
ScriptEngine()
Definition: ScriptEngine.h:39
void RegisterContext(const JSContext *cx)
Definition: ScriptEngine.h:51
Template base class for singletons.
Definition: Singleton.h:34
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
Definition: debug.h:277