Skip to content

Commit 572d0ac

Browse files
committed
fix CallInstanceFunction with non-RecycableObject thisArgs
The conditions checked in the beginning of this function were originally setup for more limited use cases. Since it is now used to call user callbacks with a user-provided thisArg, we need to allow any arguments to be passed as thisArg.
1 parent cb291c2 commit 572d0ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Runtime/Library/EngineInterfaceObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ namespace Js
425425
{
426426
EngineInterfaceObject_CommonFunctionProlog(function, callInfo);
427427

428-
if (callInfo.Count < 3 || !JavascriptConversion::IsCallable(args.Values[1]) || !RecyclableObject::Is(args.Values[2]))
428+
if (callInfo.Count < 3 || !JavascriptConversion::IsCallable(args.Values[1]))
429429
{
430430
return scriptContext->GetLibrary()->GetUndefined();
431431
}

0 commit comments

Comments
 (0)