From 0f4fff704a1e942c292c30445ff9ad24567d4dde Mon Sep 17 00:00:00 2001 From: Lei Shi Date: Wed, 17 Jan 2018 10:51:56 -0800 Subject: [PATCH] simplify xData deletion --- lib/Backend/CodeGenWorkItem.cpp | 17 ++++++- lib/Backend/EmitBuffer.cpp | 12 ++--- lib/Backend/EmitBuffer.h | 2 +- lib/Backend/NativeCodeGenerator.cpp | 32 +++++-------- lib/Backend/NativeCodeGenerator.h | 13 ++--- lib/Backend/PDataManager.cpp | 2 +- lib/Common/BackendApi.h | 2 +- lib/Common/ConfigFlagsList.h | 1 + lib/Common/Core/DelayLoadLibrary.cpp | 9 +++- .../Memory/DelayDeletingFunctionTable.cpp | 9 +++- lib/Common/Memory/XDataAllocator.h | 1 + lib/Common/Memory/amd64/XDataAllocator.cpp | 5 +- lib/JITServer/JITServer.cpp | 2 +- lib/Runtime/Base/FunctionBody.cpp | 47 +++++++++---------- lib/Runtime/Base/FunctionBody.h | 6 +-- lib/Runtime/Base/ScriptContext.cpp | 4 +- lib/Runtime/Base/ScriptContext.h | 2 +- 17 files changed, 87 insertions(+), 79 deletions(-) diff --git a/lib/Backend/CodeGenWorkItem.cpp b/lib/Backend/CodeGenWorkItem.cpp index 968537f82dc..b159236aa6f 100644 --- a/lib/Backend/CodeGenWorkItem.cpp +++ b/lib/Backend/CodeGenWorkItem.cpp @@ -205,7 +205,22 @@ void CodeGenWorkItem::OnWorkItemProcessFail(NativeCodeGenerator* codeGen) #if DBG this->allocation->allocation->isNotExecutableBecauseOOM = true; #endif - codeGen->FreeNativeCodeGenAllocation(this->allocation->allocation->address, nullptr); + +#if PDATA_ENABLED & defined(_WIN32) + if (this->entryPointInfo && this->entryPointInfo->GetXDataInfo()) + { + void* functionTable = this->entryPointInfo->GetXDataInfo()->functionTable; + if (functionTable) + { + if (!DelayDeletingFunctionTable::AddEntry(functionTable)) + { + PHASE_PRINT_TESTTRACE1(Js::XDataPhase, _u("OnWorkItemProcessFail: Failed to add to slist, table: %llx\n"), functionTable); + DelayDeletingFunctionTable::DeleteFunctionTable(functionTable); + } + } + } +#endif + codeGen->FreeNativeCodeGenAllocation(this->allocation->allocation->address); } } diff --git a/lib/Backend/EmitBuffer.cpp b/lib/Backend/EmitBuffer.cpp index 2bba1fb1657..c8116a4fc58 100644 --- a/lib/Backend/EmitBuffer.cpp +++ b/lib/Backend/EmitBuffer.cpp @@ -55,6 +55,7 @@ template void EmitBufferManager::FreeAllocations(bool release) { + DelayDeletingFunctionTable::Clear(); AutoRealOrFakeCriticalSection autoCs(&this->criticalSection); #if DBG_DUMP @@ -191,9 +192,10 @@ EmitBufferManager::NewAllocation(size_t b template bool -EmitBufferManager::FreeAllocation(void* address, void** functionTable) +EmitBufferManager::FreeAllocation(void* address) { AutoRealOrFakeCriticalSection autoCs(&this->criticalSection); + #if _M_ARM address = (void*)((uintptr_t)address & ~0x1); // clear the thumb bit #endif @@ -243,14 +245,6 @@ EmitBufferManager::FreeAllocation(void* a } VerboseHeapTrace(_u("Freeing 0x%p, allocation: 0x%p\n"), address, allocation->allocation->address); -#if PDATA_ENABLED && defined(_WIN32) - if (functionTable && *functionTable) - { - NtdllLibrary::Instance->DeleteGrowableFunctionTable(*functionTable); - *functionTable = nullptr; - } -#endif - this->allocationHeap.Free(allocation->allocation); this->allocator->Free(allocation, sizeof(TEmitBufferAllocation)); diff --git a/lib/Backend/EmitBuffer.h b/lib/Backend/EmitBuffer.h index 14e454054ba..7920ceb14ec 100644 --- a/lib/Backend/EmitBuffer.h +++ b/lib/Backend/EmitBuffer.h @@ -46,7 +46,7 @@ class EmitBufferManager bool ProtectBufferWithExecuteReadWriteForInterpreter(TEmitBufferAllocation* allocation); bool CommitBufferForInterpreter(TEmitBufferAllocation* allocation, _In_reads_bytes_(bufferSize) BYTE* pBuffer, _In_ size_t bufferSize); void CompletePreviousAllocation(TEmitBufferAllocation* allocation); - bool FreeAllocation(void* address, void** functionTable); + bool FreeAllocation(void* address); //Ends here bool IsInHeap(void* address); diff --git a/lib/Backend/NativeCodeGenerator.cpp b/lib/Backend/NativeCodeGenerator.cpp index 7cfab9052ce..180d985fde4 100644 --- a/lib/Backend/NativeCodeGenerator.cpp +++ b/lib/Backend/NativeCodeGenerator.cpp @@ -1109,6 +1109,7 @@ NativeCodeGenerator::CodeGen(PageAllocator * pageAllocator, CodeGenWorkItem* wor } #if defined(TARGET_64) + DelayDeletingFunctionTable::Clear(); XDataAllocation * xdataInfo = HeapNewZ(XDataAllocation); xdataInfo->address = (byte*)jitWriteData.xdataAddr; XDataAllocator::Register(xdataInfo, jitWriteData.codeAddress, jitWriteData.codeSize); @@ -3206,14 +3207,14 @@ NativeCodeGenerator::EnterScriptStart() } void -FreeNativeCodeGenAllocation(Js::ScriptContext *scriptContext, Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress, void** functionTable) +FreeNativeCodeGenAllocation(Js::ScriptContext *scriptContext, Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress) { if (!scriptContext->GetNativeCodeGenerator()) { return; } - scriptContext->GetNativeCodeGenerator()->QueueFreeNativeCodeGenAllocation((void*)codeAddress, (void*)thunkAddress, functionTable); + scriptContext->GetNativeCodeGenerator()->QueueFreeNativeCodeGenAllocation((void*)codeAddress, (void*)thunkAddress); } bool TryReleaseNonHiPriWorkItem(Js::ScriptContext* scriptContext, CodeGenWorkItem* workItem) @@ -3244,30 +3245,22 @@ bool NativeCodeGenerator::TryReleaseNonHiPriWorkItem(CodeGenWorkItem* workItem) } void -NativeCodeGenerator::FreeNativeCodeGenAllocation(void* codeAddress, void** functionTable) +NativeCodeGenerator::FreeNativeCodeGenAllocation(void* codeAddress) { if (JITManager::GetJITManager()->IsOOPJITEnabled()) { - // function table delete in content process -#if PDATA_ENABLED && defined(_WIN32) - if (functionTable && *functionTable) - { - NtdllLibrary::Instance->DeleteGrowableFunctionTable(*functionTable); - *functionTable = nullptr; - } -#endif ThreadContext * context = this->scriptContext->GetThreadContext(); HRESULT hr = JITManager::GetJITManager()->FreeAllocation(context->GetRemoteThreadContextAddr(), (intptr_t)codeAddress); JITManager::HandleServerCallResult(hr, RemoteCallType::MemFree); } else if(this->backgroundAllocators) { - this->backgroundAllocators->emitBufferManager.FreeAllocation(codeAddress, functionTable); + this->backgroundAllocators->emitBufferManager.FreeAllocation(codeAddress); } } void -NativeCodeGenerator::QueueFreeNativeCodeGenAllocation(void* codeAddress, void * thunkAddress, void** functionTable) +NativeCodeGenerator::QueueFreeNativeCodeGenAllocation(void* codeAddress, void * thunkAddress) { ASSERT_THREAD(); @@ -3297,24 +3290,24 @@ NativeCodeGenerator::QueueFreeNativeCodeGenAllocation(void* codeAddress, void * // OOP JIT will always queue a job // The foreground allocators may have been used - if (this->foregroundAllocators && this->foregroundAllocators->emitBufferManager.FreeAllocation(codeAddress, functionTable)) + if (this->foregroundAllocators && this->foregroundAllocators->emitBufferManager.FreeAllocation(codeAddress)) { return; } // The background allocators were used. Queue a job to free the allocation from the background thread. - this->freeLoopBodyManager.QueueFreeLoopBodyJob(codeAddress, thunkAddress, functionTable); + this->freeLoopBodyManager.QueueFreeLoopBodyJob(codeAddress, thunkAddress); } -void NativeCodeGenerator::FreeLoopBodyJobManager::QueueFreeLoopBodyJob(void* codeAddress, void * thunkAddress, void** functionTable) +void NativeCodeGenerator::FreeLoopBodyJobManager::QueueFreeLoopBodyJob(void* codeAddress, void * thunkAddress) { Assert(!this->isClosed); - FreeLoopBodyJob* job = HeapNewNoThrow(FreeLoopBodyJob, this, codeAddress, thunkAddress, *functionTable); + FreeLoopBodyJob* job = HeapNewNoThrow(FreeLoopBodyJob, this, codeAddress, thunkAddress); if (job == nullptr) { - FreeLoopBodyJob stackJob(this, codeAddress, thunkAddress, *functionTable, false /* heapAllocated */); + FreeLoopBodyJob stackJob(this, codeAddress, thunkAddress, false /* heapAllocated */); { AutoOptionalCriticalSection lock(Processor()->GetCriticalSection()); @@ -3338,9 +3331,6 @@ void NativeCodeGenerator::FreeLoopBodyJobManager::QueueFreeLoopBodyJob(void* cod HeapDelete(job); } } - - // function table successfully transferred to background job - *functionTable = nullptr; } #ifdef PROFILE_EXEC diff --git a/lib/Backend/NativeCodeGenerator.h b/lib/Backend/NativeCodeGenerator.h index 42249c4b0f3..2e8a982c746 100644 --- a/lib/Backend/NativeCodeGenerator.h +++ b/lib/Backend/NativeCodeGenerator.h @@ -104,10 +104,10 @@ void SetProfileMode(BOOL fSet); void UpdateQueueForDebugMode(); bool IsBackgroundJIT() const; void EnterScriptStart(); - void FreeNativeCodeGenAllocation(void* codeAddress, void** functionTable); + void FreeNativeCodeGenAllocation(void* codeAddress); bool TryReleaseNonHiPriWorkItem(CodeGenWorkItem* workItem); - void QueueFreeNativeCodeGenAllocation(void* codeAddress, void* thunkAddress, void** functionTable); + void QueueFreeNativeCodeGenAllocation(void* codeAddress, void* thunkAddress); bool IsClosed() { return isClosed; } void AddWorkItem(CodeGenWorkItem* workItem); @@ -201,11 +201,10 @@ void SetProfileMode(BOOL fSet); class FreeLoopBodyJob: public JsUtil::Job { public: - FreeLoopBodyJob(JsUtil::JobManager *const manager, void* codeAddress, void* thunkAddress, void* functionTable, bool isHeapAllocated = true): + FreeLoopBodyJob(JsUtil::JobManager *const manager, void* codeAddress, void* thunkAddress, bool isHeapAllocated = true): JsUtil::Job(manager), codeAddress(codeAddress), thunkAddress(thunkAddress), - functionTable(functionTable), heapAllocated(isHeapAllocated) { } @@ -213,7 +212,6 @@ void SetProfileMode(BOOL fSet); bool heapAllocated; void* codeAddress; void* thunkAddress; - void* functionTable; }; class FreeLoopBodyJobManager sealed: public WaitableJobManager @@ -281,9 +279,8 @@ void SetProfileMode(BOOL fSet); { FreeLoopBodyJob* freeLoopBodyJob = static_cast(job); - void* functionTable = freeLoopBodyJob->functionTable; // Free Loop Body - nativeCodeGen->FreeNativeCodeGenAllocation(freeLoopBodyJob->codeAddress, &functionTable); + nativeCodeGen->FreeNativeCodeGenAllocation(freeLoopBodyJob->codeAddress); return true; } @@ -306,7 +303,7 @@ void SetProfileMode(BOOL fSet); } } - void QueueFreeLoopBodyJob(void* codeAddress, void* thunkAddress, void** functionTable); + void QueueFreeLoopBodyJob(void* codeAddress, void* thunkAddress); private: NativeCodeGenerator* nativeCodeGen; diff --git a/lib/Backend/PDataManager.cpp b/lib/Backend/PDataManager.cpp index 4624f3644fc..c2869690a75 100644 --- a/lib/Backend/PDataManager.cpp +++ b/lib/Backend/PDataManager.cpp @@ -46,7 +46,7 @@ void PDataManager::UnregisterPdata(RUNTIME_FUNCTION* pdata) if (AutoSystemInfo::Data.IsWin8OrLater()) { // TODO: need to move to background? - NtdllLibrary::Instance->DeleteGrowableFunctionTable(pdata); + DelayDeletingFunctionTable::DeleteFunctionTable(pdata); } else { diff --git a/lib/Common/BackendApi.h b/lib/Common/BackendApi.h index 1920623c581..d159447486b 100644 --- a/lib/Common/BackendApi.h +++ b/lib/Common/BackendApi.h @@ -62,7 +62,7 @@ void UpdateNativeCodeGeneratorForDebugMode(NativeCodeGenerator* nativeCodeGen); CriticalSection *GetNativeCodeGenCriticalSection(NativeCodeGenerator *pNativeCodeGen); bool TryReleaseNonHiPriWorkItem(Js::ScriptContext* scriptContext, CodeGenWorkItem* workItem); void NativeCodeGenEnterScriptStart(NativeCodeGenerator * nativeCodeGen); -void FreeNativeCodeGenAllocation(Js::ScriptContext* scriptContext, Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress, void** functionTable); +void FreeNativeCodeGenAllocation(Js::ScriptContext* scriptContext, Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress); InProcCodeGenAllocators* GetForegroundAllocator(NativeCodeGenerator * nativeCodeGen, PageAllocator* pageallocator); void GenerateFunction(NativeCodeGenerator * nativeCodeGen, Js::FunctionBody * functionBody, Js::ScriptFunction * function = NULL); void GenerateLoopBody(NativeCodeGenerator * nativeCodeGen, Js::FunctionBody * functionBody, Js::LoopHeader * loopHeader, Js::EntryPointInfo* entryPointInfo, uint localCount, Js::Var localSlots[]); diff --git a/lib/Common/ConfigFlagsList.h b/lib/Common/ConfigFlagsList.h index 7d72fca49d3..915189b415b 100644 --- a/lib/Common/ConfigFlagsList.h +++ b/lib/Common/ConfigFlagsList.h @@ -371,6 +371,7 @@ PHASE(All) PHASE(DeferSourceLoad) PHASE(ObjectMutationBreakpoint) PHASE(NativeCodeData) + PHASE(XData) #undef PHASE #endif diff --git a/lib/Common/Core/DelayLoadLibrary.cpp b/lib/Common/Core/DelayLoadLibrary.cpp index b4aa4b9d773..20752028d91 100644 --- a/lib/Common/Core/DelayLoadLibrary.cpp +++ b/lib/Common/Core/DelayLoadLibrary.cpp @@ -82,12 +82,17 @@ DWORD NtdllLibrary::AddGrowableFunctionTable( _Out_ PVOID * DynamicTable, return 1; } } - return addGrowableFunctionTable(DynamicTable, + DWORD status = addGrowableFunctionTable(DynamicTable, FunctionTable, EntryCount, MaximumEntryCount, RangeBase, RangeEnd); +#if _M_X64 + PHASE_PRINT_TESTTRACE1(Js::XDataPhase, _u("Register: Begin: %llx, End: %x, Unwind: %llx, RangeBase: %llx, RangeEnd: %llx, table: %llx, Status: %x\n"), + FunctionTable->BeginAddress, FunctionTable->EndAddress, FunctionTable->UnwindInfoAddress, RangeBase, RangeEnd, *DynamicTable, status); +#endif + return status; } return 1; } @@ -107,6 +112,8 @@ VOID NtdllLibrary::DeleteGrowableFunctionTable( _In_ PVOID DynamicTable ) } } deleteGrowableFunctionTable(DynamicTable); + + PHASE_PRINT_TESTTRACE1(Js::XDataPhase, _u("UnRegister: table: %llx\n"), DynamicTable); } } diff --git a/lib/Common/Memory/DelayDeletingFunctionTable.cpp b/lib/Common/Memory/DelayDeletingFunctionTable.cpp index 3ada0a27d9d..9a58a55f830 100644 --- a/lib/Common/Memory/DelayDeletingFunctionTable.cpp +++ b/lib/Common/Memory/DelayDeletingFunctionTable.cpp @@ -64,7 +64,7 @@ void DelayDeletingFunctionTable::Clear() while (entry) { FunctionTableNode* list = (FunctionTableNode*)entry; - NtdllLibrary::Instance->DeleteGrowableFunctionTable(list->functionTable); + DeleteFunctionTable(list->functionTable); _aligned_free(entry); entry = InterlockedPopEntrySList(Head); } @@ -79,4 +79,11 @@ bool DelayDeletingFunctionTable::IsEmpty() #else return true; #endif +} + +void DelayDeletingFunctionTable::DeleteFunctionTable(void* functionTable) +{ +#if PDATA_ENABLED && defined(_WIN32) + NtdllLibrary::Instance->DeleteGrowableFunctionTable(functionTable); +#endif } \ No newline at end of file diff --git a/lib/Common/Memory/XDataAllocator.h b/lib/Common/Memory/XDataAllocator.h index 2e6a69423b4..8b9ba96d6b8 100644 --- a/lib/Common/Memory/XDataAllocator.h +++ b/lib/Common/Memory/XDataAllocator.h @@ -32,4 +32,5 @@ struct DelayDeletingFunctionTable static bool AddEntry(FunctionTableHandle ft); static void Clear(); static bool IsEmpty(); + static void DeleteFunctionTable(void* functionTable); }; \ No newline at end of file diff --git a/lib/Common/Memory/amd64/XDataAllocator.cpp b/lib/Common/Memory/amd64/XDataAllocator.cpp index 6e0114695a3..d5591038dce 100644 --- a/lib/Common/Memory/amd64/XDataAllocator.cpp +++ b/lib/Common/Memory/amd64/XDataAllocator.cpp @@ -134,10 +134,7 @@ void XDataAllocator::Register(XDataAllocation * xdataInfo, ULONG_PTR functionSta /*RangeBase*/ functionStart, /*RangeEnd*/ functionStart + functionSize); success = NT_SUCCESS(status); - if (success) - { - Assert(xdataInfo->functionTable != nullptr); - } + Assert(success && xdataInfo->functionTable != nullptr); } else { diff --git a/lib/JITServer/JITServer.cpp b/lib/JITServer/JITServer.cpp index e35ad610944..e43f6de8e08 100644 --- a/lib/JITServer/JITServer.cpp +++ b/lib/JITServer/JITServer.cpp @@ -676,7 +676,7 @@ ServerFreeAllocation( return ServerCallWrapper(context, [&]()->HRESULT { - context->GetCodeGenAllocators()->emitBufferManager.FreeAllocation((void*)codeAddress, nullptr); + context->GetCodeGenAllocators()->emitBufferManager.FreeAllocation((void*)codeAddress); return S_OK; }); } diff --git a/lib/Runtime/Base/FunctionBody.cpp b/lib/Runtime/Base/FunctionBody.cpp index 65f5d7045e7..27a6187566b 100644 --- a/lib/Runtime/Base/FunctionBody.cpp +++ b/lib/Runtime/Base/FunctionBody.cpp @@ -8834,12 +8834,18 @@ namespace Js if (this->GetState() != CleanedUp) { #if ENABLE_NATIVE_CODEGEN - void* functionTable = nullptr; #if PDATA_ENABLED if (this->xdataInfo != nullptr) { #ifdef _WIN32 - functionTable = this->xdataInfo->functionTable; + if (this->xdataInfo->functionTable) + { + if (!DelayDeletingFunctionTable::AddEntry(this->xdataInfo->functionTable)) + { + PHASE_PRINT_TESTTRACE1(Js::XDataPhase, _u("EntryPointInfo::Cleanup: Failed to add to slist, table: %llx, address: %%llx\n"), this->xdataInfo->functionTable, this->GetNativeAddress()); + DelayDeletingFunctionTable::DeleteFunctionTable(this->xdataInfo->functionTable); + } + } #endif XDataAllocator::Unregister(this->xdataInfo); #if defined(_M_ARM32_OR_ARM64) @@ -8851,19 +8857,7 @@ namespace Js this->xdataInfo = nullptr; } #endif - - this->OnCleanup(isShutdown, &functionTable); - -#if PDATA_ENABLED && defined(_WIN32) - // functionTable is not transferred somehow, delete in-thread - if (functionTable) - { - if (!DelayDeletingFunctionTable::AddEntry(functionTable)) - { - NtdllLibrary::Instance->DeleteGrowableFunctionTable(functionTable); - } - } -#endif + this->OnCleanup(isShutdown); FreeJitTransferData(); @@ -8987,14 +8981,21 @@ namespace Js this->Reset(true); Assert(this->nativeAddress != nullptr); - void* functionTable = nullptr; #if PDATA_ENABLED && defined(_WIN32) if (this->xdataInfo) { - functionTable = this->xdataInfo->functionTable; + if (this->xdataInfo->functionTable) + { + if (!DelayDeletingFunctionTable::AddEntry(this->xdataInfo->functionTable)) + { + PHASE_PRINT_TESTTRACE1(Js::XDataPhase, _u("EntryPointInfo::ResetOnLazyBailoutFailure: Failed to add to slist, table: %llx, address: %llx\n"), this->xdataInfo->functionTable, this->nativeAddress); + DelayDeletingFunctionTable::DeleteFunctionTable(this->xdataInfo->functionTable); + } + } } #endif - FreeNativeCodeGenAllocation(GetScriptContext(), this->nativeAddress, this->thunkAddress, &functionTable); + FreeNativeCodeGenAllocation(GetScriptContext(), this->nativeAddress, this->thunkAddress); + this->nativeAddress = nullptr; this->jsMethod = nullptr; } @@ -9090,7 +9091,7 @@ namespace Js return functionProxy->GetFunctionBody(); } - void FunctionEntryPointInfo::OnCleanup(bool isShutdown, void** functionTable) + void FunctionEntryPointInfo::OnCleanup(bool isShutdown) { if (this->IsCodeGenDone()) { @@ -9152,8 +9153,7 @@ namespace Js if (validationCookie == currentCookie) { - scriptContext->FreeFunctionEntryPoint((Js::JavascriptMethod)this->GetNativeAddress(), this->GetThunkAddress(), functionTable); - *functionTable = nullptr; + scriptContext->FreeFunctionEntryPoint((Js::JavascriptMethod)this->GetNativeAddress(), this->GetThunkAddress()); } } @@ -9413,7 +9413,7 @@ namespace Js //End AsmJs Support - void LoopEntryPointInfo::OnCleanup(bool isShutdown, void** functionTable) + void LoopEntryPointInfo::OnCleanup(bool isShutdown) { #ifdef ASMJS_PLAT if (this->IsCodeGenDone() && !this->GetIsTJMode()) @@ -9461,8 +9461,7 @@ namespace Js if (validationCookie == currentCookie) { - scriptContext->FreeFunctionEntryPoint(reinterpret_cast(this->GetNativeAddress()), this->GetThunkAddress(), functionTable); - *functionTable = nullptr; + scriptContext->FreeFunctionEntryPoint(reinterpret_cast(this->GetNativeAddress()), this->GetThunkAddress()); } } diff --git a/lib/Runtime/Base/FunctionBody.h b/lib/Runtime/Base/FunctionBody.h index 5d7ad18e75a..e22fc6bfabc 100644 --- a/lib/Runtime/Base/FunctionBody.h +++ b/lib/Runtime/Base/FunctionBody.h @@ -485,7 +485,7 @@ namespace Js virtual void ReleasePendingWorkItem() {}; - virtual void OnCleanup(bool isShutdown, void** functionTable) = 0; + virtual void OnCleanup(bool isShutdown) = 0; #ifdef PERF_COUNTERS virtual void OnRecorded() = 0; @@ -907,7 +907,7 @@ namespace Js } #endif - virtual void OnCleanup(bool isShutdown, void** functionTable) override; + virtual void OnCleanup(bool isShutdown) override; virtual void ReleasePendingWorkItem() override; @@ -936,7 +936,7 @@ namespace Js virtual FunctionBody *GetFunctionBody() const override; - virtual void OnCleanup(bool isShutdown, void** functionTable) override; + virtual void OnCleanup(bool isShutdown) override; #if ENABLE_NATIVE_CODEGEN virtual void ResetOnNativeCodeInstallFailure() override; diff --git a/lib/Runtime/Base/ScriptContext.cpp b/lib/Runtime/Base/ScriptContext.cpp index e637aa1ddc2..50bf4a258a5 100644 --- a/lib/Runtime/Base/ScriptContext.cpp +++ b/lib/Runtime/Base/ScriptContext.cpp @@ -4408,10 +4408,10 @@ namespace Js } #endif - void ScriptContext::FreeFunctionEntryPoint(Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress, void** functionTable) + void ScriptContext::FreeFunctionEntryPoint(Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress) { #if ENABLE_NATIVE_CODEGEN - FreeNativeCodeGenAllocation(this, codeAddress, thunkAddress, functionTable); + FreeNativeCodeGenAllocation(this, codeAddress, thunkAddress); #endif } diff --git a/lib/Runtime/Base/ScriptContext.h b/lib/Runtime/Base/ScriptContext.h index 51d49f1cec7..f7dd321b289 100644 --- a/lib/Runtime/Base/ScriptContext.h +++ b/lib/Runtime/Base/ScriptContext.h @@ -1438,7 +1438,7 @@ namespace Js return threadContext->GetEmptyStringPropertyId(); } - void FreeFunctionEntryPoint(Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress, void** functionTable); + void FreeFunctionEntryPoint(Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress); private: uint CloneSource(Utf8SourceInfo* info);