Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Add FlushProcessWriteBuffers
Browse files Browse the repository at this point in the history
  • Loading branch information
Fadi Hanna committed Aug 28, 2019
1 parent afb84f3 commit d54026d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/vm/genericdict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ BOOL DictionaryLayout::FindToken(MethodTable* pMT,
// can start using newly added dictionary layout slots on types where the PerInstInfo hasn't expanded yet, and cause runtime failures.
pMT->GetClass()->SetDictionaryLayout(pNewLayout);

// Ensure no other thread uses old dictionary pointers
FlushProcessWriteBuffers();

return TRUE;
#else
pResult->signature = pSigBuilder == NULL ? pSig : CreateSignatureWithSlotData(pSigBuilder, pAllocator, 0);
Expand Down Expand Up @@ -394,6 +397,9 @@ BOOL DictionaryLayout::FindToken(MethodDesc* pMD,
// can start using newly added dictionary layout slots on methods where the PerInstInfo hasn't expanded yet, and cause runtime failures.
pMD->AsInstantiatedMethodDesc()->IMD_SetDictionaryLayout(pNewLayout);

// Ensure no other thread uses old dictionary pointers
FlushProcessWriteBuffers();

return TRUE;
#else
pResult->signature = pSigBuilder == NULL ? pSig : CreateSignatureWithSlotData(pSigBuilder, pAllocator, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/vm/interoputil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5833,7 +5833,7 @@ MethodDesc *WinRTInterfaceRedirector::GetStubMethodForRedirectedInterface(WinMDA

if (interfaceIndex == WinMDAdapter::RedirectedTypeIndex_System_Collections_Generic_IDictionary ||
interfaceIndex == WinMDAdapter::RedirectedTypeIndex_System_Collections_Generic_IReadOnlyDictionary)
{
{
thKvPair = TypeHandle(MscorlibBinder::GetClass(CLASS__KEYVALUEPAIRGENERIC)).Instantiate(inst);
inst = Instantiation(&thKvPair, 1);
}
Expand Down

0 comments on commit d54026d

Please sign in to comment.