| 495 | } |
| 496 | |
| 497 | txBoolean fxProxyHasProperty(txMachine* the, txSlot* instance, txID id, txIndex index) |
| 498 | { |
| 499 | txBoolean result; |
| 500 | mxProxyDeclarations(_has); |
| 501 | if (function) { |
| 502 | /* THIS */ |
| 503 | mxPushSlot(handler); |
| 504 | /* FUNCTION */ |
| 505 | mxPushSlot(function); |
| 506 | mxCall(); |
| 507 | /* ARGUMENTS */ |
| 508 | mxPushSlot(target); |
| 509 | mxPushUndefined(); |
| 510 | fxKeyAt(the, id, index, the->stack); |
| 511 | mxRunCount(2); |
| 512 | result = fxToBoolean(the, the->stack); |
| 513 | mxPop(); |
| 514 | if (!result) { |
| 515 | mxPushUndefined(); |
| 516 | if (mxBehaviorGetOwnProperty(the, target->value.reference, id, index, the->stack)) { |
| 517 | if (the->stack->flag & XS_DONT_DELETE_FLAG) |
| 518 | mxTypeError("(proxy).has: false for non-configurable property"); |
| 519 | if (!mxBehaviorIsExtensible(the, target->value.reference)) |
| 520 | mxTypeError("(proxy).has: false for property of not extensible object"); |
| 521 | } |
| 522 | mxPop(); |
| 523 | } |
| 524 | } |
| 525 | else |
| 526 | result = mxBehaviorHasProperty(the, target->value.reference, id, index); |
| 527 | mxProxyPop(); |
| 528 | return result; |
| 529 | } |
| 530 | |
| 531 | txBoolean fxProxyIsExtensible(txMachine* the, txSlot* instance) |
| 532 | { |
nothing calls this directly
no test coverage detected