Skip to content

Commit 9c44af0

Browse files
leirocksMikeHolman
authored andcommitted
change m_propertyMap back to propertyMap to maintain compatibility in jd
1 parent 6153e9f commit 9c44af0

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

lib/Runtime/Base/ThreadContext.cpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ ThreadContext::ThreadContext(AllocationPolicyManager * allocationPolicyManager,
178178
telemetryBlock(&localTelemetryBlock),
179179
configuration(enableExperimentalFeatures),
180180
jsrtRuntime(nullptr),
181-
m_propertyMap(nullptr),
181+
propertyMap(nullptr),
182182
rootPendingClose(nullptr),
183183
isProfilingUserCode(true),
184184
loopDepth(0),
@@ -478,10 +478,10 @@ ThreadContext::~ThreadContext()
478478
this->recyclableData->returnedValueList = nullptr;
479479
}
480480

481-
if (this->m_propertyMap != nullptr)
481+
if (this->propertyMap != nullptr)
482482
{
483-
HeapDelete(this->m_propertyMap);
484-
this->m_propertyMap = nullptr;
483+
HeapDelete(this->propertyMap);
484+
this->propertyMap = nullptr;
485485
}
486486

487487
#if ENABLE_NATIVE_CODEGEN
@@ -850,15 +850,15 @@ ThreadContext::GetPropertyNameImpl(Js::PropertyId propertyId)
850850

851851
int propertyIndex = propertyId - Js::PropertyIds::_none;
852852

853-
if (propertyIndex < 0 || propertyIndex > m_propertyMap->GetLastIndex())
853+
if (propertyIndex < 0 || propertyIndex > propertyMap->GetLastIndex())
854854
{
855855
propertyIndex = 0;
856856
}
857857

858858
const Js::PropertyRecord * propertyRecord = nullptr;
859-
if (locked) { m_propertyMap->LockResize(); }
860-
bool found = m_propertyMap->TryGetValueAt(propertyIndex, &propertyRecord);
861-
if (locked) { m_propertyMap->UnlockResize(); }
859+
if (locked) { propertyMap->LockResize(); }
860+
bool found = propertyMap->TryGetValueAt(propertyIndex, &propertyRecord);
861+
if (locked) { propertyMap->UnlockResize(); }
862862

863863
AssertMsg(found && propertyRecord != nullptr, "using invalid propertyid");
864864
return propertyRecord;
@@ -893,11 +893,11 @@ ThreadContext::FindPropertyRecord(const char16 * propertyName, int propertyNameL
893893
if (IsDirectPropertyName(propertyName, propertyNameLength))
894894
{
895895
propertyRecord = propertyNamesDirect[propertyName[0]];
896-
Assert(propertyRecord == m_propertyMap->LookupWithKey(Js::HashedCharacterBuffer<char16>(propertyName, propertyNameLength)));
896+
Assert(propertyRecord == propertyMap->LookupWithKey(Js::HashedCharacterBuffer<char16>(propertyName, propertyNameLength)));
897897
}
898898
else
899899
{
900-
propertyRecord = m_propertyMap->LookupWithKey(Js::HashedCharacterBuffer<char16>(propertyName, propertyNameLength));
900+
propertyRecord = propertyMap->LookupWithKey(Js::HashedCharacterBuffer<char16>(propertyName, propertyNameLength));
901901
}
902902

903903
return propertyRecord;
@@ -913,12 +913,12 @@ void ThreadContext::InitializePropertyMaps()
913913
{
914914
Assert(this->recycler != nullptr);
915915
Assert(this->recyclableData != nullptr);
916-
Assert(this->m_propertyMap == nullptr);
916+
Assert(this->propertyMap == nullptr);
917917
Assert(this->caseInvariantPropertySet == nullptr);
918918

919919
try
920920
{
921-
this->m_propertyMap = HeapNew(PropertyMap, &HeapAllocator::Instance, TotalNumberOfBuiltInProperties + 700);
921+
this->propertyMap = HeapNew(PropertyMap, &HeapAllocator::Instance, TotalNumberOfBuiltInProperties + 700);
922922
#if ENABLE_NATIVE_CODEGEN
923923
this->m_pendingJITProperties = HeapNew(PropertyList, &HeapAllocator::Instance);
924924
#endif
@@ -930,11 +930,11 @@ void ThreadContext::InitializePropertyMaps()
930930
InitializeAdditionalProperties(this);
931931

932932
#if ENABLE_NATIVE_CODEGEN
933-
if (m_propertyMap->Count() > 0)
933+
if (propertyMap->Count() > 0)
934934
{
935-
uint count = (uint)m_propertyMap->Count();
935+
uint count = (uint)propertyMap->Count();
936936
PropertyRecordIDL ** propArray = HeapNewArray(PropertyRecordIDL*, count);
937-
auto iter = m_propertyMap->GetIterator();
937+
auto iter = propertyMap->GetIterator();
938938
while (iter.IsValid())
939939
{
940940
m_pendingJITProperties->Add(iter.CurrentValue());
@@ -950,11 +950,11 @@ void ThreadContext::InitializePropertyMaps()
950950
// Initialization failed, undo what was done above. Callees that throw must clean up after themselves. The recycler will
951951
// be trashed, so clear members that point to recyclable memory. Stuff in 'recyclableData' will be taken care of by the
952952
// recycler, and the 'recyclableData' instance will be trashed as well.
953-
if (this->m_propertyMap != nullptr)
953+
if (this->propertyMap != nullptr)
954954
{
955-
HeapDelete(this->m_propertyMap);
955+
HeapDelete(this->propertyMap);
956956
}
957-
this->m_propertyMap = nullptr;
957+
this->propertyMap = nullptr;
958958

959959
#if ENABLE_NATIVE_CODEGEN
960960
if (this->m_pendingJITProperties != nullptr)
@@ -1025,7 +1025,7 @@ ThreadContext::UncheckedAddPropertyId(JsUtil::CharacterBuffer<WCHAR> const& prop
10251025
}
10261026
#endif
10271027

1028-
this->m_propertyMap->EnsureCapacity();
1028+
this->propertyMap->EnsureCapacity();
10291029

10301030
// Automatically bind direct (single-character) property names, so that they can be
10311031
// stored in the direct property table
@@ -1116,7 +1116,7 @@ ThreadContext::AddPropertyRecordInternal(const Js::PropertyRecord * propertyReco
11161116
#endif
11171117

11181118
// Add to the map
1119-
m_propertyMap->Add(propertyRecord);
1119+
propertyMap->Add(propertyRecord);
11201120

11211121
#if ENABLE_NATIVE_CODEGEN
11221122
if (JITManager::GetJITManager()->IsOOPJITEnabled())
@@ -1266,7 +1266,7 @@ bool ThreadContext::IsActivePropertyId(Js::PropertyId pid)
12661266
int propertyIndex = pid - Js::PropertyIds::_none;
12671267

12681268
const Js::PropertyRecord * propertyRecord;
1269-
if (m_propertyMap->TryGetValueAt(propertyIndex, &propertyRecord) && propertyRecord != nullptr)
1269+
if (propertyMap->TryGetValueAt(propertyIndex, &propertyRecord) && propertyRecord != nullptr)
12701270
{
12711271
return true;
12721272
}
@@ -1278,20 +1278,20 @@ void ThreadContext::InvalidatePropertyRecord(const Js::PropertyRecord * property
12781278
{
12791279
InternalInvalidateProtoTypePropertyCaches(propertyRecord->GetPropertyId()); // use the internal version so we don't check for active property id
12801280

1281-
this->m_propertyMap->Remove(propertyRecord);
1281+
this->propertyMap->Remove(propertyRecord);
12821282

12831283
PropertyRecordTrace(_u("Reclaimed property '%s' at 0x%08x, pid = %d\n"),
12841284
propertyRecord->GetBuffer(), propertyRecord, propertyRecord->GetPropertyId());
12851285
}
12861286

12871287
Js::PropertyId ThreadContext::GetNextPropertyId()
12881288
{
1289-
return this->m_propertyMap->GetNextIndex() + Js::PropertyIds::_none;
1289+
return this->propertyMap->GetNextIndex() + Js::PropertyIds::_none;
12901290
}
12911291

12921292
Js::PropertyId ThreadContext::GetMaxPropertyId()
12931293
{
1294-
auto maxPropertyId = this->m_propertyMap->Count() + Js::InternalPropertyIds::Count;
1294+
auto maxPropertyId = this->propertyMap->Count() + Js::InternalPropertyIds::Count;
12951295
return maxPropertyId;
12961296
}
12971297

@@ -1310,10 +1310,10 @@ void ThreadContext::CreateNoCasePropertyMap()
13101310
// Thus, don't use BaseDictionary::Map here, as it cannot tolerate changes while mapping.
13111311
// Instead, walk the PropertyRecord entries in index order. This will work even if a GC occurs.
13121312

1313-
for (int propertyIndex = 0; propertyIndex <= this->m_propertyMap->GetLastIndex(); propertyIndex++)
1313+
for (int propertyIndex = 0; propertyIndex <= this->propertyMap->GetLastIndex(); propertyIndex++)
13141314
{
13151315
const Js::PropertyRecord * propertyRecord;
1316-
if (this->m_propertyMap->TryGetValueAt(propertyIndex, &propertyRecord) && propertyRecord != nullptr)
1316+
if (this->propertyMap->TryGetValueAt(propertyIndex, &propertyRecord) && propertyRecord != nullptr)
13171317
{
13181318
AddCaseInvariantPropertyRecord(propertyRecord);
13191319
}
@@ -4074,7 +4074,7 @@ uint ThreadContext::GetRandomNumber()
40744074
#ifdef ENABLE_JS_ETW
40754075
void ThreadContext::EtwLogPropertyIdList()
40764076
{
4077-
m_propertyMap->Map([&](const Js::PropertyRecord* propertyRecord){
4077+
propertyMap->Map([&](const Js::PropertyRecord* propertyRecord){
40784078
EventWriteJSCRIPT_HOSTING_PROPERTYID_LIST(propertyRecord, propertyRecord->GetBuffer());
40794079
});
40804080
}
@@ -4436,7 +4436,7 @@ void ThreadContext::SetValidCallTargetForCFG(PVOID callTargetAddress, bool isSet
44364436

44374437
uint ThreadContext::GetHighestPropertyNameIndex() const
44384438
{
4439-
return m_propertyMap->GetLastIndex() + 1 + Js::InternalPropertyIds::Count;
4439+
return propertyMap->GetLastIndex() + 1 + Js::InternalPropertyIds::Count;
44404440
}
44414441

44424442
#if defined(CHECK_MEMORY_LEAK) || defined(LEAK_REPORT)

lib/Runtime/Base/ThreadContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ class ThreadContext sealed :
522522
public:
523523
typedef JsUtil::BaseHashSet<const Js::PropertyRecord *, HeapAllocator, PrimeSizePolicy, const Js::PropertyRecord *,
524524
Js::PropertyRecordStringHashComparer, JsUtil::SimpleHashedEntry, JsUtil::AsymetricResizeLock> PropertyMap;
525-
PropertyMap * m_propertyMap;
525+
PropertyMap * propertyMap;
526526

527527
typedef JsUtil::BaseHashSet<Js::CaseInvariantPropertyListWithHashCode*, Recycler, PowerOf2SizePolicy, Js::CaseInvariantPropertyListWithHashCode*, JsUtil::NoCaseComparer, JsUtil::SimpleDictionaryEntry>
528528
PropertyNoCaseSetType;

0 commit comments

Comments
 (0)