Skip to content

Commit 4f21511

Browse files
committed
[MERGE #5163 @pleath] [MSFT 16846859] Make ScopeSlots::Is handle null slot in FrameDisplay
Merge pull request #5163 from pleath:16846859
2 parents d2fec40 + 07505eb commit 4f21511

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Runtime/Base/FunctionBody.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3380,6 +3380,12 @@ namespace Js
33803380
// CONSIDER: Use TaggedInt instead of range of slot count to distinguish slot array with others.
33813381
static bool Is(void* object)
33823382
{
3383+
if (object == nullptr)
3384+
{
3385+
// Null slot in a frame where nothing is captured and the scope object has been eliminated
3386+
// by stack args optimization.
3387+
return false;
3388+
}
33833389
size_t slotCount = *((size_t*)object);
33843390
if(slotCount <= MaxEncodedSlotCount)
33853391
{

0 commit comments

Comments
 (0)