Skip to content

Commit 3655cb0

Browse files
committed
[MERGE chakra-core#1698 @MikeHolman] fix crash when using jscript ETW provider
Merge pull request chakra-core#1698 from MikeHolman:etw
2 parents 2d589ce + 8e69a1f commit 3655cb0

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
@@ -39,7 +39,7 @@ struct CodeGenWorkItem : public JsUtil::Job
3939

4040
uint GetFunctionNumber() const
4141
{
42-
return this->jitData.jitData->bodyData->funcNumber;
42+
return this->functionBody->GetFunctionNumber();
4343
}
4444

4545
ExecutionMode GetJitMode() const

lib/Backend/NativeCodeGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,6 @@ NativeCodeGenerator::CodeGen(PageAllocator * pageAllocator, CodeGenWorkItem* wor
945945
(((double)((end_time.QuadPart - jitWriteData.startTime)* (double)1000.0 / (double)freq.QuadPart))) / (1));
946946
Output::Flush();
947947
}
948-
NativeCodeGenerator::LogCodeGenDone(workItem, &start_time);
949-
950948

951949
workItem->GetFunctionBody()->SetFrameHeight(workItem->GetEntryPoint(), jitWriteData.frameHeight);
952950

@@ -1138,6 +1136,8 @@ NativeCodeGenerator::CodeGen(PageAllocator * pageAllocator, CodeGenWorkItem* wor
11381136
}
11391137
#endif
11401138

1139+
NativeCodeGenerator::LogCodeGenDone(workItem, &start_time);
1140+
11411141
#ifdef ENABLE_BASIC_TELEMETRY
11421142
scriptContext->GetThreadContext()->JITTelemetry.LogTime(scriptContext->GetThreadContext()->JITTelemetry.Now() - startTime);
11431143
#endif

0 commit comments

Comments
 (0)