• Home
  • Raw
  • Download

Lines Matching full:if

30     // 1. If Type(target) is not Object, throw a TypeError exception.  in ProxyCreate()
31 if (!target->IsECMAObject()) { in ProxyCreate()
36 // 2. If Type(handler) is not Object, throw a TypeError exception. in ProxyCreate()
37 if (!handler->IsECMAObject()) { in ProxyCreate()
42 // 6. If IsCallable(target) is true, then P.[[Call]] as specified in 9.5.12. in ProxyCreate()
55 // 2. If handler is null, throw a TypeError exception. in GetPrototype()
56 if (handler->IsNull()) { in GetPrototype()
69 // 7. If trap is undefined, then Return target.[[GetPrototypeOf]](). in GetPrototype()
70 if (trap->IsUndefined()) { in GetPrototype()
82 // 10. If Type(handlerProto) is neither Object nor Null, throw a TypeError exception. in GetPrototype()
83 if (!handlerProto.IsECMAObject() && !handlerProto.IsNull()) { in GetPrototype()
89 // 13. If extensibleTarget is true, return handlerProto. in GetPrototype()
90 if (targetHandle->IsExtensible(thread)) { in GetPrototype()
99 // 16. If SameValue(handlerProto, targetProto) is false, throw a TypeError exception. in GetPrototype()
100 if (!JSTaggedValue::SameValue(handlerProto, targetProto)) { in GetPrototype()
116 // 3. If handler is null, throw a TypeError exception. in SetPrototype()
117 if (handler.IsNull()) { in SetPrototype()
130 // 7. If trap is undefined, then Return target.[[SetPrototypeOf]](V). in SetPrototype()
131 if (trap->IsUndefined()) { in SetPrototype()
143 // If booleanTrapResult is false, return false in SetPrototype()
145 if (!booleanTrapResult) { in SetPrototype()
151 // 13. If extensibleTarget is true, return booleanTrapResult in SetPrototype()
152 if (targetHandle->IsExtensible(thread)) { in SetPrototype()
162 …// 16. If booleanTrapResult is true and SameValue(V, targetProto) is false, throw a TypeError exce… in SetPrototype()
163 if (booleanTrapResult && !JSTaggedValue::SameValue(proto.GetTaggedValue(), targetProto)) { in SetPrototype()
176 // 2. If handler is null, throw a TypeError exception. in IsExtensible()
177 if (handler.IsNull()) { in IsExtensible()
190 // 7. If trap is undefined, then Return target.[[IsExtensible]](). in IsExtensible()
191 if (trap->IsUndefined()) { in IsExtensible()
209 // 12. If SameValue(booleanTrapResult, targetResult) is false, throw a TypeError exception. in IsExtensible()
211 if (targetHandle->IsExtensible(thread) != booleanTrapResult) { in IsExtensible()
223 // 2. If handler is null, throw a TypeError exception. in PreventExtensions()
228 // 7. If trap is undefined, then in PreventExtensions()
233 if (handler.IsNull()) { in PreventExtensions()
243 if (trap->IsUndefined()) { in PreventExtensions()
256 // 10. If booleanTrapResult is true, then in PreventExtensions()
259 // c. If targetIsExtensible is true, throw a TypeError exception. in PreventExtensions()
260 if (booleanTrapResult && targetHandle->IsExtensible(thread)) { in PreventExtensions()
275 // 3. If handler is null, throw a TypeError exception. in GetOwnProperty()
280 // 8. If trap is undefined, then in GetOwnProperty()
284 // 11. If Type(trapResultObj) is neither Object nor Undefined, throw a TypeError exception in GetOwnProperty()
286 if (handler.IsNull()) { in GetOwnProperty()
296 if (trap->IsUndefined()) { in GetOwnProperty()
309 // 11. If Type(trapResultObj) is neither Object nor Undefined, throw a TypeError exception. in GetOwnProperty()
310 if (!trapResultObj.IsECMAObject() && !trapResultObj.IsUndefined()) { in GetOwnProperty()
319 // 14. If trapResultObj is undefined, then in GetOwnProperty()
320 if (resultHandle->IsUndefined()) { in GetOwnProperty()
321 // a. If targetDesc is undefined, return undefined. in GetOwnProperty()
322 if (!found) { in GetOwnProperty()
325 // b. If targetDesc.[[Configurable]] is false, throw a TypeError exception. in GetOwnProperty()
326 if (!targetDesc.IsConfigurable()) { in GetOwnProperty()
332 // f. If extensibleTarget is false, throw a TypeError exception. in GetOwnProperty()
333 if (!targetHandle->IsExtensible(thread)) { in GetOwnProperty()
350 if (!valid) { in GetOwnProperty()
353 // 22. If resultDesc.[[Configurable]] is false, then in GetOwnProperty()
354 if (!resultDesc.IsConfigurable()) { in GetOwnProperty()
355 // a. If targetDesc is undefined or targetDesc.[[Configurable]] is true, then in GetOwnProperty()
356 if (!found || targetDesc.IsConfigurable()) { in GetOwnProperty()
359 // b. If resultDesc has a [[Writable]] field and resultDesc.[[Writable]] is false, then in GetOwnProperty()
360 // If targetDesc.[[Writable]] is true, throw a TypeError exception. in GetOwnProperty()
361 if (resultDesc.HasWritable() && !resultDesc.IsWritable() && targetDesc.IsWritable()) { in GetOwnProperty()
364 // b. If resultDesc has a [[Writable]] field and resultDesc.[[Writable]] is false, then in GetOwnProperty()
365 // If targetDesc.[[Writable]] is true, throw a TypeError exception. in GetOwnProperty()
366 if (resultDesc.HasWritable() && !resultDesc.IsWritable() && targetDesc.IsWritable()) { in GetOwnProperty()
382 if (handler.IsNull()) { in DefineOwnProperty()
391 if (trap->IsUndefined()) { in DefineOwnProperty()
408 if (!booleanTrapResult) { in DefineOwnProperty()
419 …// 17. If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is false, then Let settin… in DefineOwnProperty()
423 if (desc.HasConfigurable() && !desc.IsConfigurable()) { in DefineOwnProperty()
426 // 19. If targetDesc is undefined, then in DefineOwnProperty()
427 if (!found) { in DefineOwnProperty()
428 // a. If extensibleTarget is false, throw a TypeError exception. in DefineOwnProperty()
429 if (!targetHandle->IsExtensible(thread)) { in DefineOwnProperty()
432 // b. If settingConfigFalse is true, throw a TypeError exception. in DefineOwnProperty()
433 if (settingConfigFalse) { in DefineOwnProperty()
437 …// a. If IsCompatiblePropertyDescriptor(extensibleTarget, Desc , targetDesc) is false, throw a Typ… in DefineOwnProperty()
439if (!JSObject::IsCompatiblePropertyDescriptor(targetHandle->IsExtensible(thread), desc, targetDesc… in DefineOwnProperty()
442 …// b. If settingConfigFalse is true and targetDesc.[[Configurable]] is true, throw a TypeError exc… in DefineOwnProperty()
443 if (settingConfigFalse && targetDesc.IsConfigurable()) { in DefineOwnProperty()
446 …// c. If IsDataDescriptor(targetDesc) is true, targetDesc.[[Configurable]] is false, and targetDes… in DefineOwnProperty()
447 …// is true, then If Desc has a [[Writable]] field and Desc.[[Writable]] is false, throw a TypeErro… in DefineOwnProperty()
448if (targetDesc.IsDataDescriptor() && !targetDesc.IsConfigurable() && targetDesc.IsWritable() && in DefineOwnProperty()
452 …// c. If IsDataDescriptor(targetDesc) is true, targetDesc.[[Configurable]] is false, and targetDes… in DefineOwnProperty()
453 …// is true, then If Desc has a [[Writable]] field and Desc.[[Writable]] is false, throw a TypeErro… in DefineOwnProperty()
454if (targetDesc.IsDataDescriptor() && !targetDesc.IsConfigurable() && targetDesc.IsWritable() && in DefineOwnProperty()
470 if (handler.IsNull()) { in HasProperty()
479 if (trap->IsUndefined()) { in HasProperty()
497 // 11. If booleanTrapResult is false, then in HasProperty()
498 if (!booleanTrapResult) { in HasProperty()
504 // c. If targetDesc is not undefined, then in HasProperty()
505 if (found) { in HasProperty()
506 // i. If targetDesc.[[Configurable]] is false, throw a TypeError exception. in HasProperty()
507 if (!targetDesc.IsConfigurable()) { in HasProperty()
512 // iv. If extensibleTarget is false, throw a TypeError exception. in HasProperty()
513 if (!targetHandle->IsExtensible(thread)) { in HasProperty()
530 if (handler.IsNull()) { in GetProperty()
542 if (trap->IsUndefined()) { in GetProperty()
567 // 13. If targetDesc is not undefined, then in GetProperty()
568 if (found) { in GetProperty()
569 …// a. If IsDataDescriptor(targetDesc) and targetDesc.[[Configurable]] is false and targetDesc.[[Wr… in GetProperty()
571if (targetDesc.IsDataDescriptor() && !targetDesc.IsConfigurable() && !targetDesc.IsWritable()) { in GetProperty()
572 … // i. If SameValue(trapResult, targetDesc.[[Value]]) is false, throw a TypeError exception. in GetProperty()
573if (!JSTaggedValue::SameValue(resultHandle.GetTaggedValue(), targetDesc.GetValue().GetTaggedValue(… in GetProperty()
579 …// b. If IsAccessorDescriptor(targetDesc) and targetDesc.[[Configurable]] is false and targetDesc.… in GetProperty()
581 if (targetDesc.IsAccessorDescriptor() && !targetDesc.IsConfigurable() && in GetProperty()
583 // i. If trapResult is not undefined, throw a TypeError exception. in GetProperty()
584 if (!resultHandle.GetTaggedValue().IsUndefined()) { in GetProperty()
603 if (handler.IsNull()) { in SetProperty()
612 if (trap->IsUndefined()) { in SetProperty()
629 if (!booleanTrapResult) { in SetProperty()
635 // 14. If targetDesc is not undefined, then in SetProperty()
636 if (found) { in SetProperty()
637 …// a. If IsDataDescriptor(targetDesc) and targetDesc.[[Configurable]] is false and targetDesc.[[Wr… in SetProperty()
639if (targetDesc.IsDataDescriptor() && !targetDesc.IsConfigurable() && !targetDesc.IsWritable()) { in SetProperty()
640 … // i. If SameValue(trapResult, targetDesc.[[Value]]) is false, throw a TypeError exception. in SetProperty()
641 if (!JSTaggedValue::SameValue(value, targetDesc.GetValue())) { in SetProperty()
645 // b. If IsAccessorDescriptor(targetDesc) and targetDesc.[[Configurable]] is false, then in SetProperty()
646 // i. If targetDesc.[[Set]] is undefined, throw a TypeError exception. in SetProperty()
647 if (targetDesc.IsAccessorDescriptor() && !targetDesc.IsConfigurable() && in SetProperty()
662 if (handler.IsNull()) { in DeleteProperty()
671 if (trap->IsUndefined()) { in DeleteProperty()
688 if (!booleanTrapResult) { in DeleteProperty()
694 // 14. If targetDesc is undefined, return true. in DeleteProperty()
695 if (!found) { in DeleteProperty()
698 // 15. If targetDesc.[[Configurable]] is false, throw a TypeError exception. in DeleteProperty()
699 if (!targetDesc.IsConfigurable()) { in DeleteProperty()
702 if (!targetHandle->IsExtensible(thread)) { in DeleteProperty()
705 if (!targetHandle->IsExtensible(thread)) { in DeleteProperty()
718 if (handler.IsNull()) { in OwnPropertyKeys()
734 // 7.If trap is undefined, then in OwnPropertyKeys()
736 if (trap->IsUndefined()) { in OwnPropertyKeys()
752 // If trapResult contains any duplicate entries, throw a TypeError exception. in OwnPropertyKeys()
757 if (trapRes->HasDuplicateEntry()) { in OwnPropertyKeys()
780 // c.If desc is not undefined and desc.[[Configurable]] is false, then in OwnPropertyKeys()
798 if (!desc.IsEmpty() && !desc.IsConfigurable()) { in OwnPropertyKeys()
807 // 19.If extensibleTarget is true and targetNonconfigurableKeys is empty, then in OwnPropertyKeys()
809 if (extensibleTarget && (cfigLength == 0)) { in OwnPropertyKeys()
819 // a.If key is not an element of uncheckedResultKeys, throw a TypeError exception. in OwnPropertyKeys()
823 if (idx == TaggedArray::MAX_ARRAY_INDEX) { in OwnPropertyKeys()
831 // 22.If extensibleTarget is true, return trapResult. in OwnPropertyKeys()
832 if (extensibleTarget) { in OwnPropertyKeys()
837 // a.If key is not an element of uncheckedResultKeys, throw a TypeError exception. in OwnPropertyKeys()
841 if (idx == TaggedArray::MAX_ARRAY_INDEX) { in OwnPropertyKeys()
849 // 24.If uncheckedResultKeys is not empty, throw a TypeError exception. in OwnPropertyKeys()
850 if (uncheckLength != 0) { in OwnPropertyKeys()
862 if (info == nullptr) { in CallInternal()
871 if (handler->IsNull()) { in CallInternal()
886 // 7.If trap is undefined, then in CallInternal()
888 if (method->IsUndefined()) { in CallInternal()
915 if (info == nullptr) { in ConstructInternal()
924 if (handler->IsNull()) { in ConstructInternal()
936 // 7.If trap is undefined, then in ConstructInternal()
939 if (method->IsUndefined()) { in ConstructInternal()
966 // 11.If Type(newObj) is not Object, throw a TypeError exception. in ConstructInternal()
967 if (!newObj.IsECMAObject()) { in ConstructInternal()
976 if (GetHandler().IsNull()) { in IsArray()