Make FromJSProperty actually part of ScriptInterface.

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D876
This was SVN commit r20179.
This commit is contained in:
leper
2017-09-12 22:52:15 +00:00
parent 66bdc460f4
commit 189da09a7e
2 changed files with 9 additions and 4 deletions
+5
View File
@@ -282,6 +282,11 @@ public:
*/
template<typename T> static void ToJSVal(JSContext* cx, JS::MutableHandleValue ret, T const& val);
/**
* Convert a named property of an object to a C++ type.
*/
template<typename T> static bool FromJSProperty(JSContext* cx, const JS::HandleValue val, const char* name, T& ret);
/**
* MaybeGC tries to determine whether garbage collection in cx's runtime would free up enough memory to be worth the amount of time it would take.
* This calls JS_MaybeGC directly, which does not do incremental GC. Usually you should prefer MaybeIncrementalRuntimeGC.