From afaa4417e438184724b40863e46d2095da489609 Mon Sep 17 00:00:00 2001 From: elexis Date: Thu, 5 Sep 2019 16:45:16 +0000 Subject: [PATCH] Add ScriptInterface::AssignOrToJSVal > 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. --- source/scriptinterface/ScriptInterface.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/scriptinterface/ScriptInterface.h b/source/scriptinterface/ScriptInterface.h index d91889a0f5..3924d10a76 100644 --- a/source/scriptinterface/ScriptInterface.h +++ b/source/scriptinterface/ScriptInterface.h @@ -508,6 +508,12 @@ inline void ScriptInterface::AssignOrToJSVal(JSContex handle.set(a); } +template<> +inline void ScriptInterface::AssignOrToJSVal >(JSContext* UNUSED(cx), JS::MutableHandleValue handle, const JS::Heap& a) +{ + handle.set(a); +} + template<> inline void ScriptInterface::AssignOrToJSVal(JSContext* UNUSED(cx), JS::MutableHandleValue handle, const JS::RootedValue& a) {