diff --git a/lib/Backend/ServerThreadContext.cpp b/lib/Backend/ServerThreadContext.cpp index 37093123181..be1827b63a8 100644 --- a/lib/Backend/ServerThreadContext.cpp +++ b/lib/Backend/ServerThreadContext.cpp @@ -169,6 +169,12 @@ ServerThreadContext::CanCreatePreReservedSegment() const return m_canCreatePreReservedSegment; } +void +ServerThreadContext::SetCanCreatePreReservedSegment(bool value) +{ + m_canCreatePreReservedSegment = value; +} + bool ServerThreadContext::IsNumericProperty(Js::PropertyId propertyId) { diff --git a/lib/Backend/ServerThreadContext.h b/lib/Backend/ServerThreadContext.h index 7aa1d258415..26e2a9de649 100644 --- a/lib/Backend/ServerThreadContext.h +++ b/lib/Backend/ServerThreadContext.h @@ -72,7 +72,7 @@ class ServerThreadContext : public ThreadContextInfo intptr_t GetRuntimeChakraBaseAddress() const; intptr_t GetRuntimeCRTBaseAddress() const; bool CanCreatePreReservedSegment() const; - + void SetCanCreatePreReservedSegment(bool value); static intptr_t GetJITCRTBaseAddress(); private: diff --git a/lib/JITServer/JITServer.cpp b/lib/JITServer/JITServer.cpp index 5712447bcef..b86fd3d5841 100644 --- a/lib/JITServer/JITServer.cpp +++ b/lib/JITServer/JITServer.cpp @@ -221,6 +221,7 @@ ServerInitializeThreadContext( if (!PHASE_OFF1(Js::PreReservedHeapAllocPhase)) { *prereservedRegionAddr = (intptr_t)contextInfo->GetPreReservedSectionAllocator()->EnsurePreReservedRegion(); + contextInfo->SetCanCreatePreReservedSegment(*prereservedRegionAddr != 0); } #if !defined(_M_ARM) *jitThunkAddr = (intptr_t)contextInfo->GetJITThunkEmitter()->EnsureInitialized();