Add ScriptInterface::AssignOrToJSVal<JS::Heap<JS::Value> > to support ScriptInterface::SetGlobal, SetProperty, CreateObject with JS::Heap values.

Differential Revision: https://code.wildfiregames.com/D2263
Tested on: gcc 9.1.0, Jenkins
Refs D2264

This was SVN commit r22853.
This commit is contained in:
elexis 2019-09-05 16:45:16 +00:00
parent e7ebe821c0
commit afaa4417e4

View file

@ -508,6 +508,12 @@ inline void ScriptInterface::AssignOrToJSVal<JS::PersistentRootedValue>(JSContex
handle.set(a);
}
template<>
inline void ScriptInterface::AssignOrToJSVal<JS::Heap<JS::Value> >(JSContext* UNUSED(cx), JS::MutableHandleValue handle, const JS::Heap<JS::Value>& a)
{
handle.set(a);
}
template<>
inline void ScriptInterface::AssignOrToJSVal<JS::RootedValue>(JSContext* UNUSED(cx), JS::MutableHandleValue handle, const JS::RootedValue& a)
{