@@ -86,6 +86,10 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
86
86
87
87
if (IsValid (Object))
88
88
{
89
+ FScopeCycleCounterUObject ContextScope (Object);
90
+ FScopeCycleCounterUObject PropertyScope (Property);
91
+ SCOPE_CYCLE_COUNTER (STAT_JavascriptPropertyGet);
92
+
89
93
if (auto p = Cast<UMulticastDelegateProperty>(Property))
90
94
{
91
95
return GetSelf (isolate)->Delegates ->GetProxy (self, Object, p);
@@ -156,6 +160,10 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
156
160
157
161
if (IsValid (Object))
158
162
{
163
+ FScopeCycleCounterUObject ContextScope (Object);
164
+ FScopeCycleCounterUObject PropertyScope (Property);
165
+ SCOPE_CYCLE_COUNTER (STAT_JavascriptPropertySet);
166
+
159
167
// Multicast delegate
160
168
if (auto p = Cast<UMulticastDelegateProperty>(Property))
161
169
{
@@ -545,8 +553,24 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
545
553
546
554
void ReadOffStruct (Local<Object> v8_obj, UStruct* Struct, uint8* struct_buffer)
547
555
{
556
+ SCOPE_CYCLE_COUNTER (STAT_JavascriptReadOffStruct);
557
+ FScopeCycleCounterUObject StructContext (Struct);
558
+
548
559
FIsolateHelper I (isolate_);
549
560
561
+ /*
562
+ MaybeLocal<Array> _arr = v8_obj->GetOwnPropertyNames();
563
+ if (_arr.IsEmpty()) return;
564
+
565
+ auto arr = _arr.ToLocalChecked();
566
+
567
+ auto len = arr->Length();
568
+
569
+ for (decltype(len) Index = 0; Index < len; ++Index)
570
+ {
571
+ }
572
+ */
573
+
550
574
for (TFieldIterator<UProperty> PropertyIt (Struct, EFieldIteratorFlags::IncludeSuper); PropertyIt; ++PropertyIt)
551
575
{
552
576
auto Property = *PropertyIt;
@@ -902,6 +926,7 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
902
926
if (info.Length () == 1 )
903
927
{
904
928
auto Profile = profiler->StopProfiling (info[0 ].As <String>());
929
+ if (!Profile) return ;
905
930
906
931
auto Out = Object::New (isolate);
907
932
Out->Set (I.Keyword (" Root" ), Visit (isolate, Profile->GetTopDownRoot ()));
@@ -1117,6 +1142,8 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
1117
1142
template <typename Fn>
1118
1143
static Local<Value> CallFunction (Isolate* isolate, Local<Value> self, UFunction* Function, UObject* Object, Fn&& GetArg)
1119
1144
{
1145
+ SCOPE_CYCLE_COUNTER (STAT_JavascriptFunctionCall);
1146
+
1120
1147
FIsolateHelper I (isolate);
1121
1148
1122
1149
EscapableHandleScope handle_scope (isolate);
0 commit comments