Split off StructuredClone from ScriptInterface

Follows 34b1920e7b.

This separates StructuredClone & DeepCopy logic into its own header,
reducing the size of the monolithic ScriptInterface header.

Differential Revision: https://code.wildfiregames.com/D3922
This was SVN commit r25419.
This commit is contained in:
wraitii
2021-05-10 11:51:32 +00:00
parent ad62707eef
commit 6fbf036ae4
29 changed files with 266 additions and 180 deletions
@@ -32,7 +32,7 @@
#include "ps/GUID.h"
#include "ps/Util.h"
#include "scriptinterface/FunctionWrapper.h"
#include "scriptinterface/ScriptInterface.h"
#include "scriptinterface/StructuredClone.h"
#include "third_party/encryption/pkcs5_pbkdf2.h"
@@ -210,7 +210,7 @@ CStr GetPlayerGUID()
return g_NetClient->GetGUID();
}
JS::Value PollNetworkClient(const ScriptInterface& scriptInterface)
JS::Value PollNetworkClient(const ScriptInterface& guiInterface)
{
if (!g_NetClient)
return JS::UndefinedValue();
@@ -219,7 +219,7 @@ JS::Value PollNetworkClient(const ScriptInterface& scriptInterface)
ScriptRequest rqNet(g_NetClient->GetScriptInterface());
JS::RootedValue pollNet(rqNet.cx);
g_NetClient->GuiPoll(&pollNet);
return scriptInterface.CloneValueFromOtherCompartment(g_NetClient->GetScriptInterface(), pollNet);
return Script::CloneValueFromOtherCompartment(guiInterface, g_NetClient->GetScriptInterface(), pollNet);
}
void SendGameSetupMessage(const ScriptInterface& scriptInterface, JS::HandleValue attribs1)