(ExecutionContext context, String name, PropertyDescriptor desc, boolean shouldThrow)
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | public boolean defineOwnProperty(ExecutionContext context, String name, PropertyDescriptor desc, boolean shouldThrow) { |
| 57 | // 10.6 [[DefineOwnProperty]] |
| 58 | boolean allowed = super.defineOwnProperty(context, name, desc, false); |
| 59 | if (!allowed) { |
| 60 | return reject(context, shouldThrow); |
| 61 | } |
| 62 | |
| 63 | if (this.map.getOwnProperty(context, name) != Types.UNDEFINED) { |
| 64 | if (desc.isAccessorDescriptor()) { |
| 65 | this.map.delete(context, name, false); |
| 66 | } else { |
| 67 | if (desc.hasValue()) { |
| 68 | this.map.put(context, name, desc.getValue(), shouldThrow); |
| 69 | } |
| 70 | if (desc.hasWritable() && !desc.isWritable()) { |
| 71 | this.map.delete(context, name, false); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | } |
| 76 | |
| 77 | return true; |
| 78 | } |
| 79 | |
| 80 | @Override |
| 81 | public boolean delete(ExecutionContext context, String name, boolean shouldThrow) { |
no test coverage detected