Split off Object-related functions from ScriptInterface

Follows 34b1920e7b.

This splits off the object-related functions, such as
[Set/Get/Has]Property, CreateObject, CreateArray, FreezeObject.

It also puts the definitions in the header itself, which might end up
with faster code here & there, though perhaps slower compilation time
(somewhat doubtful since we already included most things anyways).

Differential Revision: https://code.wildfiregames.com/D3956
This was SVN commit r25430.
This commit is contained in:
wraitii
2021-05-13 17:23:52 +00:00
parent cb263b9f26
commit 0f60bf3a97
49 changed files with 661 additions and 766 deletions
@@ -20,6 +20,7 @@
#include "DebugSerializer.h"
#include "scriptinterface/FunctionWrapper.h"
#include "scriptinterface/Object.h"
#include "scriptinterface/ScriptInterface.h"
#include "lib/secure_crt.h"
@@ -153,7 +154,7 @@ void CDebugSerializer::PutScriptVal(const char* name, JS::MutableHandleValue val
ScriptRequest rq(m_ScriptInterface);
JS::RootedValue serialize(rq.cx);
if (m_ScriptInterface.GetProperty(value, "Serialize", &serialize) && !serialize.isNullOrUndefined())
if (Script::GetProperty(rq, value, "Serialize", &serialize) && !serialize.isNullOrUndefined())
{
// If the value has a Serialize property, pretty-parse that instead.
// (this gives more accurate OOS reports).