@@ -8670,6 +8670,7 @@ namespace Js
86708670
86718671 return true ;
86728672 }
8673+
86738674 BOOL JavascriptOperators::ToPropertyDescriptorForProxyObjects (Var propertySpec, PropertyDescriptor* descriptor, ScriptContext* scriptContext)
86748675 {
86758676 if (!JavascriptOperators::IsObject (propertySpec))
@@ -8822,7 +8823,8 @@ namespace Js
88228823
88238824 BOOL JavascriptOperators::ToPropertyDescriptor (Var propertySpec, PropertyDescriptor* descriptor, ScriptContext* scriptContext)
88248825 {
8825- if (JavascriptProxy::Is (propertySpec))
8826+ if (JavascriptProxy::Is (propertySpec) ||
8827+ JavascriptOperators::CheckIfPrototypeChainContainsProxyObject (RecyclableObject::FromVar (propertySpec)->GetPrototype ()))
88268828 {
88278829 if (ToPropertyDescriptorForProxyObjects (propertySpec, descriptor, scriptContext) == FALSE )
88288830 {
@@ -9960,16 +9962,13 @@ namespace Js
99609962 return !Equal (aLeft, aRight, scriptContext);
99619963 }
99629964
9963-
99649965 // NotStrictEqual() returns whether the two vars have strict equality, as
99659966 // described in (ES3.0: S11.9.5, S11.9.6).
9966-
99679967 BOOL JavascriptOperators::NotStrictEqual (Var aLeft, Var aRight, ScriptContext* scriptContext)
99689968 {
99699969 return !StrictEqual (aLeft, aRight, scriptContext);
99709970 }
99719971
9972-
99739972 bool JavascriptOperators::CheckIfObjectAndPrototypeChainHasOnlyWritableDataProperties (RecyclableObject* object)
99749973 {
99759974 Assert (object);
@@ -10040,6 +10039,25 @@ namespace Js
1004010039 return true ;
1004110040 }
1004210041
10042+ // Checks to see if the specified object (which should be a prototype object)
10043+ // contains a proxy anywhere in the prototype chain.
10044+ bool JavascriptOperators::CheckIfPrototypeChainContainsProxyObject (RecyclableObject* prototype)
10045+ {
10046+ Assert (JavascriptOperators::IsObjectOrNull (prototype));
10047+
10048+ while (prototype->GetTypeId () != TypeIds_Null)
10049+ {
10050+ if (prototype->GetTypeId () == TypeIds_Proxy)
10051+ {
10052+ return true ;
10053+ }
10054+
10055+ prototype = prototype->GetPrototype ();
10056+ }
10057+
10058+ return false ;
10059+ }
10060+
1004310061 BOOL JavascriptOperators::Equal (Var aLeft, Var aRight, ScriptContext* scriptContext)
1004410062 {
1004510063 if (aLeft == aRight)
0 commit comments