Changeset View
Changeset View
Standalone View
Standalone View
source/scriptinterface/ScriptInterface.h
Show First 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | public: | ||||
bool LoadGlobalScriptFile(const VfsPath& path) const; | bool LoadGlobalScriptFile(const VfsPath& path) const; | ||||
/** | /** | ||||
* Construct a new value (usable in this ScriptInterface's context) by cloning | * Construct a new value (usable in this ScriptInterface's context) by cloning | ||||
* a value from a different context. | * a value from a different context. | ||||
* Complex values (functions, XML, etc) won't be cloned correctly, but basic | * Complex values (functions, XML, etc) won't be cloned correctly, but basic | ||||
* types and cyclic references should be fine. | * types and cyclic references should be fine. | ||||
*/ | */ | ||||
JS::Value CloneValueFromOtherContext(const ScriptInterface& otherContext, JS::HandleValue val) const; | JS::Value CloneValueFromOtherContext(const ScriptInterface& otherScriptInterface, JS::HandleValue val) const; | ||||
/** | /** | ||||
* Convert a JS::Value to a C++ type. (This might trigger GC.) | * Convert a JS::Value to a C++ type. (This might trigger GC.) | ||||
*/ | */ | ||||
template<typename T> static bool FromJSVal(JSContext* cx, const JS::HandleValue val, T& ret); | template<typename T> static bool FromJSVal(JSContext* cx, const JS::HandleValue val, T& ret); | ||||
/** | /** | ||||
* Convert a C++ type to a JS::Value. (This might trigger GC. The return | * Convert a C++ type to a JS::Value. (This might trigger GC. The return | ||||
▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator