Skip to content

Commit 7028755

Browse files
committed
Use AutoDisableInterrupt when doing a ReAlloc to disable QC while messing with the ArrayBuffer's state
1 parent 1841642 commit 7028755

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Runtime/Library/ArrayBuffer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,10 @@ namespace Js
10951095
}
10961096
else
10971097
{
1098+
// Disable QC while doing a ReAlloc to minimize chances to end up in a bad state
1099+
AutoDisableInterrupt autoDisableInterrupt(this->GetScriptContext()->GetThreadContext()->GetInterruptPoller(), true);
1100+
Unused(autoDisableInterrupt);
1101+
10981102
byte* newBuffer = nullptr;
10991103
const auto reallocFunc = [&]
11001104
{

0 commit comments

Comments
 (0)