Skip to content

Commit c25389f

Browse files
committed
Don't try to create a RecyclableObject::FromVar without checking that the Var is in fact a RecyclableObject first.
1 parent d8fe29c commit c25389f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/Runtime/Language/JavascriptOperators.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8823,8 +8823,9 @@ namespace Js
88238823

88248824
BOOL JavascriptOperators::ToPropertyDescriptor(Var propertySpec, PropertyDescriptor* descriptor, ScriptContext* scriptContext)
88258825
{
8826-
if (JavascriptProxy::Is(propertySpec) ||
8827-
JavascriptOperators::CheckIfPrototypeChainContainsProxyObject(RecyclableObject::FromVar(propertySpec)->GetPrototype()))
8826+
if (JavascriptProxy::Is(propertySpec) || (
8827+
RecyclableObject::Is(propertySpec) &&
8828+
JavascriptOperators::CheckIfPrototypeChainContainsProxyObject(RecyclableObject::FromVar(propertySpec)->GetPrototype())))
88288829
{
88298830
if (ToPropertyDescriptorForProxyObjects(propertySpec, descriptor, scriptContext) == FALSE)
88308831
{

0 commit comments

Comments
 (0)