Skip to content

Commit 8e69a1f

Browse files
committed
fix crash when using jscript ETW provider
1 parent 6902ef7 commit 8e69a1f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/Backend/CodeGenWorkItem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct CodeGenWorkItem : public JsUtil::Job
4242

4343
uint GetFunctionNumber() const
4444
{
45-
return this->jitData.jitData->bodyData->funcNumber;
45+
return this->functionBody->GetFunctionNumber();
4646
}
4747

4848
ExecutionMode GetJitMode() const

lib/Backend/NativeCodeGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,6 @@ NativeCodeGenerator::CodeGen(PageAllocator * pageAllocator, CodeGenWorkItem* wor
958958
(((double)((end_time.QuadPart - jitWriteData.startTime)* (double)1000.0 / (double)freq.QuadPart))) / (1));
959959
Output::Flush();
960960
}
961-
NativeCodeGenerator::LogCodeGenDone(workItem, &start_time);
962-
963961

964962
workItem->GetFunctionBody()->SetFrameHeight(workItem->GetEntryPoint(), jitWriteData.frameHeight);
965963

@@ -1151,6 +1149,8 @@ NativeCodeGenerator::CodeGen(PageAllocator * pageAllocator, CodeGenWorkItem* wor
11511149
}
11521150
#endif
11531151

1152+
NativeCodeGenerator::LogCodeGenDone(workItem, &start_time);
1153+
11541154
#ifdef ENABLE_BASIC_TELEMETRY
11551155
scriptContext->GetThreadContext()->JITTelemetry.LogTime(scriptContext->GetThreadContext()->JITTelemetry.Now() - startTime);
11561156
#endif

0 commit comments

Comments
 (0)