Skip to content

Commit 1348ade

Browse files
committed
PR feedback
1 parent 25dfd41 commit 1348ade

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Runtime/Base/CallInfo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ namespace Js
9393

9494
static bool HasExtraArg(CallFlags flags)
9595
{
96+
// Generally HasNewTarget should not be true if CallFlags_ExtraArg is not set.
97+
Assert(!CallInfo::HasNewTarget(flags) || flags & CallFlags_ExtraArg);
98+
99+
// we will still check HasNewTarget to be safe in case if above invariant does not hold.
96100
return (flags & CallFlags_ExtraArg) || CallInfo::HasNewTarget(flags);
97101
}
98102

0 commit comments

Comments
 (0)