(ExecutionContext context, String name, boolean shouldThrow)
| 250 | } |
| 251 | |
| 252 | @Override |
| 253 | public boolean delete(ExecutionContext context, String name, boolean shouldThrow) { |
| 254 | // 8.12.7 |
| 255 | if (!this.properties.containsKey(name)) { |
| 256 | return true; |
| 257 | } |
| 258 | Object d = getOwnProperty(context, name, false); |
| 259 | if (d == Types.UNDEFINED) { |
| 260 | return true; |
| 261 | } |
| 262 | |
| 263 | PropertyDescriptor desc = (PropertyDescriptor) d; |
| 264 | |
| 265 | if (desc.isConfigurable()) { |
| 266 | this.properties.remove(name); |
| 267 | return true; |
| 268 | } |
| 269 | |
| 270 | if (shouldThrow) { |
| 271 | throw new ThrowException(context, context.createTypeError("cannot delete unconfigurable property '" + name + "'")); |
| 272 | } |
| 273 | |
| 274 | return false; |
| 275 | } |
| 276 | |
| 277 | @Override |
| 278 | public Object defaultValue(ExecutionContext context, String hint) { |
no test coverage detected