|
|
@@ -1258,6 +1258,8 @@ BailOutRecord::BailOutInlinedHelper(Js::JavascriptCallStackLayout * layout, Bail
|
|
|
}
|
|
|
|
|
|
// Let's restore the inline stack - so that in case of a stack walk we have it available
|
|
|
+ InlinedFrameLayout *inlinedFrameToRestore = nullptr;
|
|
|
+ Js::ArgSlot clearedCallInfoCount = 0;
|
|
|
if (entryPointInfo->HasInlinees())
|
|
|
{
|
|
|
InlineeFrameRecord* inlineeFrameRecord = entryPointInfo->FindInlineeFrame(returnAddress);
|
|
|
@@ -1267,7 +1269,7 @@ BailOutRecord::BailOutInlinedHelper(Js::JavascriptCallStackLayout * layout, Bail
|
|
|
// object, the cached version (that was previously boxed) will be reused to maintain pointer identity and correctness
|
|
|
// after the transition to the interpreter.
|
|
|
InlinedFrameLayout* outerMostFrame = (InlinedFrameLayout *)(((uint8 *)Js::JavascriptCallStackLayout::ToFramePointer(layout)) - entryPointInfo->GetFrameHeight());
|
|
|
- inlineeFrameRecord->RestoreFrames(functionBody, outerMostFrame, layout, true /* boxArgs */);
|
|
|
+ inlineeFrameRecord->RestoreFrames(functionBody, outerMostFrame, layout, true /*boxArgs*/, &inlinedFrameToRestore, &clearedCallInfoCount);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1275,6 +1277,12 @@ BailOutRecord::BailOutInlinedHelper(Js::JavascriptCallStackLayout * layout, Bail
|
|
|
{
|
|
|
InlinedFrameLayout *inlinedFrame = (InlinedFrameLayout *)(((char *)layout) + currentBailOutRecord->globalBailOutRecordTable->firstActualStackOffset);
|
|
|
Js::InlineeCallInfo inlineeCallInfo = inlinedFrame->callInfo;
|
|
|
+ if (inlinedFrameToRestore == inlinedFrame)
|
|
|
+ {
|
|
|
+ // Restore the frame's callinfo count prior to using it to create an interpreter instance
|
|
|
+ Assert(inlineeCallInfo.Count == 0);
|
|
|
+ inlineeCallInfo.Count = clearedCallInfoCount;
|
|
|
+ }
|
|
|
Assert((Js::ArgSlot)inlineeCallInfo.Count == currentBailOutRecord->actualCount);
|
|
|
|
|
|
Js::CallFlags callFlags = Js::CallFlags_Value;
|