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 d379d9e commit fd724ba
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit fd724ba

Please sign in to comment.